<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi Bob</p>
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.<br>
<br>
Many thanks,<br>
Simon<br>
<br>
<br>
<div class="moz-cite-prefix">On 25/03/2017 19:47, Robert Fisher
wrote:<br>
</div>
<blockquote
cite="mid:CAD40uox2ykNQ-s-CLEtdbfgkwmok+=+sp1wK1BFHgXb9NZkWwg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Simon :
<div> </div>
<div> 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:</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="http://flash.uchicago.edu/site/flashcode/user_support/flash4_ug_4p4/node204.html">http://flash.uchicago.edu/site/flashcode/user_support/flash4_ug_4p4/node204.html</a><br>
</div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div> 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</div>
<div><br>
</div>
<div>source/physics/Hydro/HydroMain/split/PPM/PPMKernel/hydro_1d.F90<br>
</div>
<div><br>
</div>
<div>and the routines calling it to see how the gravitational
accelerations are applied to the momentum and energy equations
at the half-timestep intervals.</div>
<div><br>
</div>
<div> Best wishes,</div>
<div><br>
</div>
<div> Bob</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sat, Mar 25, 2017 at 1:59 PM, Simon
Daley-Yates <span dir="ltr"><<a moz-do-not-send="true"
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 all<br>
<br>
I'm new to flash and just starting out.<br>
<br>
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?<br>
<br>
The calculation of the new source term requires access to
the hole solution array every timestep/half timestep. Is
this possible?<br>
<br>
Many thanks in advance,<br>
Simon<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 moz-do-not-send="true"
href="mailto:robert.fisher@umassd.edu" target="_blank">robert.fisher@umassd.edu</a><br>
<a moz-do-not-send="true" href="http://www.novastella.org"
target="_blank">http://www.novastella.org</a></div>
</div>
</div>
</blockquote>
<br>
</body>
</html>