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

Simon Daley-Yates sdaley at star.sr.bham.ac.uk
Mon Apr 24 08:47:23 EDT 2017


Hi Bob

Yes, you are absolutely correct that this setup does lead to numerical 
difficulties of the type you mention. I have previously run this 
simulation using the code PLUTO. This was using the Divergence cleaning 
method and not CT. The results are stable with minimal pollution of the 
solution outside the star (I'm only interested in the dynamics of the wind).

Your suggestion of moving the interior boundary to the surface of the 
star I'm guessing would involve using Simulation_defineDomain.F90 to 
remove the blocks inside the stellar radius? This sounds like a plan. 
However, reading the source code and the guide, it is a bit opaque how 
boundary conditions are then applied to the removed blocks. The surface 
of my star is revealed by successively refining blocks. If I'm removing 
hole blocks from the simulation, and one block is comparable in size to 
my star, this my not work.

I may try using your suggestion of raising the density in the star to 
freeze in the field. 


In all honesty, after using PLUTO for a couple of years, I was curious 
to see what other established codes could do, so if I can't get this 
working in FLASH, never mined.

Thank you for your help.

Simon


On 24/04/2017 11:56, Robert Fisher wrote:
> Hi Simon :
>
>   You raise a number of interesting technical points, but I would 
> advise you to reconsider the setup itself. A key problem in numerical 
> MHD is to ensure the satisfaction of the div . B = 0 constraint, and 
> by overwriting the interior solution you will surely be breaking the 
> constraint along the surface of the star, leading to the development 
> of numerical monopoles. These monopoles will in turn create forces 
> along the field lines, which will corrupt the solution.
>
>   Perhaps you could consider moving the interior boundary to the 
> surface of the star, and specifying the field as a boundary condition 
> there. Alternatively you could also reduce the magnetic wave speeds 
> within the star (e.g. by increasing the density) to such a great 
> extent that the field within the star will be effectively completely 
> frozen over the duration of your simulation. Either will achieve the 
> same result as what you are imposing by hand now, but while also 
> maintaining div . B = 0.
>
>   Best wishes,
>   Bob
>
> On Mon, Apr 24, 2017 at 6:25 AM, Simon Daley-Yates 
> <sdaley at star.sr.bham.ac.uk <mailto:sdaley at star.sr.bham.ac.uk>> wrote:
>
>     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
>
>
>
>
> -- 
> Dr. Robert Fisher
> Associate Professor / Graduate Program Director
> University of Massachusetts/Dartmouth
> Department of Physics
> 285 Old Westport Road
> North Dartmouth, Massachusetts 02747
> robert.fisher at umassd.edu <mailto:robert.fisher at umassd.edu>
> http://www.novastella.org

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


More information about the flash-users mailing list