[FLASH-USERS] Magnetized Inflow: Torus Problem

Ryan Farber rjfarber at umich.edu
Sat Feb 2 18:44:53 EST 2019


Dear all,

I have not fixed the issue of zero density values within Eos yet but would
like to share the following update and would be very grateful for help in
understanding why unk (in the physicaldata module) would have all zero
values despite solnData receiving values in Simulation_initBlock.

First, I should mention that the error occurs in eos_idealGamma which is
called by Eos -> Eos_wrapped -> Eos_guardCells -> Grid_fillGuardCells ->
Grid_markRefineDerefine -> gr_expandDomain -> Grid_initDomain ->
Driver_initFlash

At first, I found that the minimum value of density was zero at the end of
Simulation_initBlock because the loop setting density did not include guard
cells. So, I modified that (replaced blkLimits with blkLimitsGC for the
loop start and stop values) and found that the minimum density was fine
until after the call to amr_guardcells in Grid_fillGuardCells.

Within Grid_fillGuardCells, just before the call to amr_guardcells I found
that minval(solnData(DENS_VAR,:,:,:) was the value I set for all (5)
blocks. However, the very start of amr_guardcells (within
mpi_amr_guardcells.F90) has minval(unk(DENS_VAR,:,:,:,:) = 0.0 (and also
all zeros for all other variables).


Additionally, the end result of amr_guardcells is to set the density = -1.0
for the parent block while setting the density to zero for the leaf blocks.

This is undesirable yet I am not sure how to proceed. I'd be very grateful
for any suggestions or ideas people may have.

Best
--------
Ryan Farber
PhD Candidate, University of Michigan


On Sat, Feb 2, 2019 at 1:12 PM Ryan Farber <rjfarber at umich.edu> wrote:

> Dear FLASH users,
>
> TL;DR: Setting xl_boundary_type = "user", cells are filled with zero
> density although Grid_bcApplyToRegionSpecialized was not yet called. There
> is no such problem with all periodic BCs. If someone familiar with user BCs
> could mention which additional routines are executed that I might want to
> look into to debug this problem I'd very much appreciate it.
>
> =========================================================
>
> I am trying to modify the Torus problem included in FLASH4.5 to include a
> magnetized inflow from the lower x-boundary.
>
> So, I modified flash.par to turn off gravity, comment out gr_prmp*
> variables, set geometry to cartesian, lrefine_min = 3, and set all BCs to
> periodic except xl_boundary_type = "user".
>
> Additionally, I modified Simulation_initBlock so the domain is initially
> at a uniform density and temperature with zero velocity and zero magnetic
> field.
>
> When I run the simulation with all BCs set to periodic, I receive many
> warning messages about the density being the value I set (modulo roundoff
> error) with a lot of output (possibly printing the entire density array?);
> however, it runs to completion fine and plots show the domain remained
> uniform (as to be expected).
>
> However, when I set xl_boundary_type = "user" then the warning messages
> say minimum density is -1.0 and it crashes with:
>
> ERROR After calling Eos, eosData(EOS_EINT) or eosData(EOS_DENS) are zero
>
> Compiling with -debug I receive a "floating invalid" error with traceback
> to eos_idealGamma.F90 with a line in which there is a division by density
> (which is zero, triggering the floating invalid error). However, I have
> write statements at the start of Grid_bcApplyToRegionSpecialized that are
> never executed suggesting that routine is not called yet.
>
> I am seeking to eliminate this zero density issue; I'd be very grateful
> for any pointers those familiar with user BCs could point out.
>
> Best,
> --------
> Ryan Farber
> PhD Candidate, University of Michigan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20190202/02863291/attachment.htm>


More information about the flash-users mailing list