[FLASH-USERS] Adding new source terms to FLASH
Simon Daley-Yates
sdaley at star.sr.bham.ac.uk
Sun Mar 26 11:12:31 EDT 2017
Hi Bob
Thanks for the information on adding source terms. It should be faily
stright forward to adapt one of the existing source modules for my needs.
Many thanks,
Simon
On 25/03/2017 19:47, Robert Fisher wrote:
> Hi Simon :
> Adding your own source terms to FLASH is straightforward due to the
> clean organization of the code. You can read about the process in very
> broad strokes in the manual:
>
> http://flash.uchicago.edu/site/flashcode/user_support/flash4_ug_4p4/node204.html
>
> which includes a stub example module and instructions on how to
> introduce your new source term to the Driver module. However, I'd
> recommend using one of the actual source modules (Heat, Ionize, etc.)
> close to the physics of your intended source term, and working
> backward from there.
>
> The process above will allow you access to integral timestep state
> data, and should suffice for a first-order accurate source term.
> Accessing the half-step data for higher-order accuracy is more subtle,
> and requires adding the source terms directly to the hydro solver. For
> an example, you can look at
>
> source/physics/Hydro/HydroMain/split/PPM/PPMKernel/hydro_1d.F90
>
> and the routines calling it to see how the gravitational accelerations
> are applied to the momentum and energy equations at the half-timestep
> intervals.
>
> Best wishes,
>
> Bob
>
> On Sat, Mar 25, 2017 at 1:59 PM, Simon Daley-Yates
> <sdaley at star.sr.bham.ac.uk <mailto:sdaley at star.sr.bham.ac.uk>> wrote:
>
> Dear all
>
> I'm new to flash and just starting out.
>
> My question is: how easy is it to add new source terms to FLASH?
> Is this someting trivial or does it require intimate knolage of
> the way FLASH is written? Is there anyone that has done this and
> has any advice on how to go about achiving this?
>
> The calculation of the new source term requires access to the hole
> solution array every timestep/half timestep. Is this possible?
>
> 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/20170326/255b3797/attachment-0001.htm>
More information about the flash-users
mailing list