<div dir="ltr">Hi Simon :<div><br></div><div> 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.</div><div><br></div><div> 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.</div><div><br></div><div> Best wishes,</div><div> </div><div> Bob</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 24, 2017 at 6:25 AM, Simon Daley-Yates <span dir="ltr"><<a href="mailto:sdaley@star.sr.bham.ac.uk" target="_blank">sdaley@star.sr.bham.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Flash users<br>
<br>
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.<br>
<br>
I'm working in Cartesian coordinates and in the rotating frame of the star.
<br>
<br>
My problem requires the following:<br>
<br>
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. <br>
<br>
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.<br>
<br>
3/ I would like to use the unsplit stagard mesh MHD method for the magnetic field.<br>
<br>
There are a number of different examples of setting up a MHD simulation in the source/Simulation/SimulationMa<wbr>in/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? <br>
<br>
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? <br>
<br>
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).<br>
<br>
If anyone has had experience constructing this type of problem or they have any advice, it would be very appreciated.<br>
<br>
Many thanks in advance,<br>
Simon<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Dr. Robert Fisher<br>Associate Professor / Graduate Program Director<br>University of Massachusetts/Dartmouth<br>Department of Physics<br>285 Old Westport Road<br>North Dartmouth, Massachusetts 02747<br><a href="mailto:robert.fisher@umassd.edu" target="_blank">robert.fisher@umassd.edu</a><br><a href="http://www.novastella.org" target="_blank">http://www.novastella.org</a></div></div>
</div>