[FLASH-USERS] Initialising the magnetic field, stagard mesh MHD

Simon Daley-Yates sdaley at star.sr.bham.ac.uk
Mon Apr 24 06:25:48 EDT 2017


Dear Flash users

I'm in the process of putting together a simulation of a stellar wind 
based on parkers equation for the solar wind. I also need to put a 
dipole magnetic field on the star.

I'm working in Cartesian coordinates and in the rotating frame of the star.


My problem requires the following:

1/ The region inside the star (r < 1 R_star) needs to be held constant. 
To do this I am using the Simulation_adjustEvolution.F90 subroutine. 


2/ A point source gravity acceleration vector and acceleration due to 
Coriolis and centrifugal forces. I am doing both of these with the 
Gravity_accelOneRow.F90 subroutine.

3/ I would like to use the unsplit stagard mesh MHD method for the 
magnetic field.

There are a number of different examples of setting up a MHD simulation 
in the source/Simulation/SimulationMain/magnetoMHD folder but they all 
use the method of setting initial conditions using the 
solnData(DENS_VAR,i,j,k) array and not the call 
Grid_putPointData(blockId, CENTER, DENS_VAR, EXTERIOR, axis, rhoZone) 
function call as recommended in the user guide pdf. 
Which is the 
correct method? 


Also, there are no examples for initialising the face centred variables 
i.e. face centred magnetic fields. Is this also done with call 
Grid_putPointData(blockId, CENTER, DENS_VAR, EXTERIOR, axis, rhoZone) 
method and is there an example? 


When holding the region inside the star constant, I'm assuming I need to 
also hold the magnetic field (cell centred and face centred) constant. 
When I do this the output for the magnitude of the magnetic field 
sqrt(magx**2 + magy**2 + magz**2) is corrupted (please see attached figure).

If anyone has had experience constructing this type of problem or they 
have any advice, it would be very appreciated.

Many thanks in advance,
Simon

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mag.png
Type: image/png
Size: 296579 bytes
Desc: not available
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20170424/b6cdec9a/attachment.png>


More information about the flash-users mailing list