[FLASH-USERS] Non-constant Magnetic Resistivity

Aaron Tran aaron.tran at columbia.edu
Thu Aug 20 14:00:20 EDT 2020


Hi Ryan,

In the file MagneticResistivity_interface.F90, does updating
MagneticResistivity_fullState(...) to also accept your xx, yy arguments
have any effect?

Or, would it be appropriate to /not/ pass xx, yy to this particular call to
MagneticResistivity(...) ?  I haven't used the MagneticResistivity unit
before, so don't know what the right solution is.

call MagneticResistivity(xCenter(i),yCenter(j),U(:,i,j,k), magResist(i,j,k))

sends in U(:,i,j,k), an array of NUNK_VARS reals, but the interface code
you copied seems to expect temp, dens, and xn (real, real, array of reals).
The interface also includes "MagneticResistivity_fullState", which does
take solnVec(NUNK_VARS), so it looks like MagneticResistivity(...) is a
polymorphic function.

Best,
Aaron

On Thu, Aug 20, 2020 at 10:26 AM Ryan Farber <rjfarber at umich.edu> wrote:

> Hi FLASH-users,
>
> I expect there is an embarrassingly simple solution to my problem but
> since I'm at my wit's end:
>
> I successfully modified the following files to make the magnetic
> resistivity eta = eta(x) for a test problem. However, when I do eta =
> eta(x,y), compilation fails with the following error in
> hy_uhd_getFaceFlux.F90
>
> Files modified:
>   MagneticResistivity_interface.F90
>   MagneticResistivity.F90
>   Diffuse_computeDt.F90
>   hy_uhd_unsplitUpdate.F90
>   hy_uhd_getFaceFlux.F90
>
> Error message:
>
> hy_uhd_getFaceFlux.F90(333): error #6285: There is no matching specific
> subroutine for this generic subroutine call.   [MAGNETICRESISTIVITY]
>
>                  call
> MagneticResistivity(xCenter(i),yCenter(j),U(:,i,j,k), &
>
> ----------------------^
>
> compilation aborted for hy_uhd_getFaceFlux.F90 (code 1)
>
> make: *** [hy_uhd_getFaceFlux.o] Error 1
>
> make: *** Waiting for unfinished jobs....
>
>
> Excerpt from getFaceFlux:
>
> #if defined(FLASH_USM_MHD)
>
>   if (hy_useMagneticResistivity) then
>
>     !! Get magnetic viscosity
>
>     *call* MagneticResistivity(xCenter(i),yCenter(j),U(:,i,j,k), &
>
>                                           magResist(i,j,k))
>
>   endif
>
> #endif
>
>
> Excerpt from MagneticResistivity_interface:
>
>   interface MagneticResistivity
>
>
>      subroutine MagneticResistivity(xx,yy,temp,dens,xn,magResist)
>
>        real, intent(IN) :: xx,yy
>
>        real, intent(IN)  :: temp, dens
>
>        real, intent(IN), dimension(NSPECIES)  :: xn
>
>        real, intent(OUT) :: magResist
>
>      end subroutine MagneticResistivity
>
> I'm flummoxed since all I did was add "yCenter(j)" to the call of
> MagneticResistivity (and accordingly modified its arguments in the
> subroutine and in the interface).
>
> If you can point out what silly thing I'm missing, that would be great!
>
> Best,
> --------
> Ryan Farber
> University of Michigan
> PhD Candidate
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20200820/ad3839bb/attachment-0001.htm>


More information about the flash-users mailing list