[FLASH-USERS] Read some variables as data files as initialization to flash and initialize others with math functions?

Suoqing JI suoqing at physics.ucsb.edu
Thu Jul 31 19:58:01 EDT 2014


Hi Hava,

Yes — you could initialize the quantities by either calculating from some math functions or reading in from data files.

I assume you use cell coordinate as variables and get the distribution of density and pressure via some functions. In the magenticHD/BrioWu problem directory, I believe the cell coordinates are already stored in xCoord, yCoord, … etc.

To read in quantities from data files, the CCSN problem set is a good example to look at. However, extra divB might be introduced by interpolation if it were used. You might want to set the structure of FLASH grid points to be the same as your data points, and directly put your data to the cell-face-centered variables of FLASH (assume your data file are divB free and stored as cell-face-centered variables). 

An alternative way is to import the magnetic potential and take the curl later to get the divB free magnetic field, as the magenticHD/FieldLoop does.

Best wishes,
--
Suoqing JI
Ph.D Student
Department of Physics
University of California, Santa Barbara
CA 93106, USA

On Jul 31, 2014, at 11:22 AM, Hava Turkakin <turkakin at ualberta.ca> wrote:

> Hi
> Can somebody please tell me if it is possible to read in some values as
> data and initialize others with math. functions. If so, how will let
> flash know which values I am reading. Just typing values names as
> velx,vely, magx,magy in the data file will be enough? I don't see any
> other specification in the code that tells which column represent
> which values?  I want to initialize velocity and magnetic fields
> perturbations from data files and density and pressure as math
> functions? I am modifiying magnetoHD/Brio-Wu problem to do this.
> Thank you
> I greatly appreciate any help.
> 
> -- 
> Hava Turkakin
> PhD Candidate
> University of Alberta
> Space Physics Research Group

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20140731/f3d5246f/attachment.htm>


More information about the flash-users mailing list