<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Hi Michiel,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">I don't understand why you should have those files like cool_integrate.F90 directly under your simulation directory as it appears that you do. It seems that you've been moving files around and not maintaining the directory structure that setup expects. You might want to try to start fresh with the original directory structure. I would only place the additional cooling code under </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">source/physics/sourceTerms/Cool/CoolMain/SutherlandDopita/ </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">You might also want to look into flmake. You can find it on the FLASH website. It simplifies setting up runs and keeps the results of runs in nicely separated directories.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Good luck,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Jon</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 2, 2016 at 6:19 AM, Michiel Bustraan <span dir="ltr"><<a href="mailto:michiel.bustraan@astro.su.se" target="_blank">michiel.bustraan@astro.su.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Jon,<br>
</p>
<p><br>
</p>
<p>I tried simplifying the setup and possibly made some progress, though it still doesn't work.<br>
</p>
<p>I originally kept the old cooling files in my sourceterms directory, but changed the name of the folder.<br>
</p>
<p>I assumed that would prevent them from being used, but I think I was wrong. It's possible that my cooling code worked previously without doing anything because it was just using the empty cooling code that FLASH came with.<br>
</p>
<p><br>
</p>
<p>What I've done now is just replace the cooling codes in standard FLASH, which did nothing, with the fortran files from the sutherlanddopita folder from the supplementary files.<br>
</p>
<p>So now in my setup I'm adding "physics/sourceTerms/Cool".<br>
</p>
<p><br>
</p>
<p>The results are different, so having those old files there was having an effect, but now I get the following message when trying to compile:<br>
</p>
<p><br>
</p>
<div>Driver_computeDt.o: In function `driver_computedt_':</div>
<div>/home/mbust/FLASH4.3/<wbr>coolsimulation/Driver_<wbr>computeDt.F90:335: undefined reference to `cool_computedt_'</div>
<div>Driver_finalizeSourceTerms.o: In function `driver_finalizesourceterms_':</div>
<div>/home/mbust/FLASH4.3/<wbr>coolsimulation/Driver_<wbr>finalizeSourceTerms.F90:45: undefined reference to `cool_finalize_'</div>
<div>Driver_initSourceTerms.o: In function `driver_initsourceterms_':</div>
<div>/home/mbust/FLASH4.3/<wbr>coolsimulation/Driver_<wbr>initSourceTerms.F90:46: undefined reference to `cool_init_'</div>
<div>Driver_sourceTerms.o: In function `driver_sourceterms_':</div>
<div>/home/mbust/FLASH4.3/<wbr>coolsimulation/Driver_<wbr>sourceTerms.F90:61: undefined reference to `cool_'</div>
<div>cool_integrate.o: In function `cool_integrate_':</div>
<div>/home/mbust/FLASH4.3/<wbr>coolsimulation/cool_integrate.<wbr>F90:49: undefined reference to `cool_deriv_'</div>
<div>/home/mbust/FLASH4.3/<wbr>coolsimulation/cool_integrate.<wbr>F90:53: undefined reference to `cool_deriv_'</div>
<div>/home/mbust/FLASH4.3/<wbr>coolsimulation/cool_integrate.<wbr>F90:57: undefined reference to `cool_deriv_'</div>
<div>/home/mbust/FLASH4.3/<wbr>coolsimulation/cool_integrate.<wbr>F90:62: undefined reference to `cool_deriv_'</div>
<div>collect2: error: ld returned 1 exit status</div>
<div>make: *** [flash4] Error 1</div>
<div><br>
The issues in cool_integrate I ran into before, and I was able to fix that by just adding a copy of the cool_deriv subroutine to the cool_integrate file.<br>
</div>
<div>The error messages related to the Driver files I'm not as sure about. I got the same when I simply removed the old cooling code and copied in the entire supplementary cooling folder, as you suggested (with <span style="color:rgb(33,33,33);font-family:arial,helvetica,sans-serif">-unit=physics/<wbr>sourceTerms/Cool/CoolMain/<wbr>SutherlandDopita</span><span style="font-size:12pt">
in the setup).</span></div>
<div><span style="font-size:12pt"><br>
</span></div>
<div>I'm not sure how to fix the issue with Driver, since it's just calling on the relevant cooling subroutines in various points of the code.<br>
</div>
<div>This issue didn't happen when the old cooling files were still in the sourceTerms directory under a different name.<br>
</div>
<div><br>
</div>
<div>Kind Regards,<br>
</div>
<div>Michiel<br>
</div>
<p><br>
</p>
<div style="color:rgb(33,33,33)">
<hr style="display:inline-block;width:98%">
<div id="m_5930336468602795371divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Slavin, Jonathan <<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>><br>
<b>Sent:</b> Monday, October 31, 2016 5:22 PM<div><div class="h5"><br>
<b>To:</b> Michiel Bustraan<br>
<b>Subject:</b> Re: [FLASH-USERS] flash-users Digest, Vol 108, Issue 7</div></div></font>
<div> </div>
</div><div><div class="h5">
<div>
<div dir="ltr">
<div style="font-family:arial,helvetica,sans-serif;font-size:small">
Hi Michiel,</div>
<div style="font-family:arial,helvetica,sans-serif;font-size:small">
<br>
</div>
<div style="font-family:arial,helvetica,sans-serif;font-size:small">
When you say that you "...simply copied the entire Cool folder in place of the existing one..." do you mean that in the copied sourceTerms/Cool/ into source/physics/<wbr>sourceTerms/Cool/ in the original source tree? It's not clear to me if that's a problem or
not. When I was getting this working, I had some trouble building. I think what I ended up doing was copying the sourceTerms directory tree in the supplementary units package to source/physics/sourceTerms under my simulation directory. Then I used</div>
<div><font face="arial, helvetica, sans-serif">-unit=physics/sourceTerms/<wbr>Cool/CoolMain/SutherlandDopita</font><br>
</div>
<div><font face="arial, helvetica, sans-serif">as an argument to setup. There is a Cool_init.F90 file in that SutherlandDopita directory.</font></div>
<div><font face="arial, helvetica, sans-serif"><br>
</font></div>
<div><font face="arial, helvetica, sans-serif">You do need to give the full path for the cooling function file, I think.</font></div>
<div><font face="arial, helvetica, sans-serif"><br>
</font></div>
<div><font face="arial, helvetica, sans-serif">Regards,</font></div>
<div><font face="arial, helvetica, sans-serif">Jon</font></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Oct 31, 2016 at 11:50 AM, Michiel Bustraan <span dir="ltr">
<<a href="mailto:michiel.bustraan@astro.su.se" target="_blank">michiel.bustraan@astro.su.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Jon,<br>
</p>
<p><br>
</p>
<p>When adding the supplementary unit to the code, I simply copied the entire Cool folder in place of the existing one (which did nothing).<br>
</p>
<p><br>
</p>
<p>When setting up the simulation, I got an error message:<br>
</p>
<p><br>
</p>
<div>WARNING: Missing 'init' File</div>
<div> Each API-level unit directory must directly contain an initialization file</div>
<div> whose name matches the name of that directory plus "_init.F90"</div>
<div> The directory "physics/sourceTerms/Cool" does not contain a file</div>
<div> "Cool_init.F90"<br>
</div>
<div><br>
That file is missing because the cooling I was using is located in (as listed in the log file):<br>
</div>
<div><br>
</div>
<div>physics/sourceTerms/Cool/CoolM<wbr>ain/SutherlandDopita<br>
</div>
<div><br>
</div>
<div>So I assumed it wouldn't be an issue. Could this be the problem?<br>
</div>
<div>Regarding the runtimeparameters, usecool was set to true, though changing it to false doesn't change the results.<br>
</div>
<div>cool_fctn_file is simply the file (mzero.cie), since I added it to the simulation folder.<br>
</div>
<div><br>
</div>
<div>When running the code, there is no output that indicates that cooling is being calculated.<br>
</div>
<div>No relevant messages at the start, no visible calculation of the cooling timestep.<br>
</div>
<div><br>
</div>
<div>Kind Regards,<br>
</div>
<div>Michiel<br>
</div>
<p><br>
</p>
<div style="color:rgb(33,33,33)">
<hr style="display:inline-block;width:98%">
<div id="m_5930336468602795371m_-5937992789849139360divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Slavin, Jonathan <<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>><br>
<b>Sent:</b> Monday, October 31, 2016 4:21 PM<br>
<b>To:</b> Michiel Bustraan
<div>
<div class="m_5930336468602795371h5"><br>
<b>Subject:</b> Re: [FLASH-USERS] flash-users Digest, Vol 108, Issue 7</div>
</div>
</font>
<div> </div>
</div>
<div>
<div class="m_5930336468602795371h5">
<div>
<div dir="ltr">
<div style="font-family:arial,helvetica,sans-serif;font-size:small">
Hi Michiel,</div>
<div style="font-family:arial,helvetica,sans-serif;font-size:small">
<br>
</div>
<div style="font-family:arial,helvetica,sans-serif;font-size:small">
In the log file created for your run, do you see the directory where the cooling code is located under the "FLASH Units used" section? Do you see also in the file under "RuntimeParameters" that cool_fctn_file is set to the correct file (needs the full path)
and that usecool is set to T? Also, in the screen output from the run (which I typically capture to a file) do you see messages like:</div>
<div><font face="arial, helvetica, sans-serif">init_cool: attempting to read cooling function file ...</font><br>
</div>
<div><font face="arial, helvetica, sans-serif">where ... should show the file name being read?</font></div>
<div><font face="arial, helvetica, sans-serif"><br>
</font></div>
<div><font face="arial, helvetica, sans-serif">Regards,</font></div>
<div><font face="arial, helvetica, sans-serif">Jon</font></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Oct 31, 2016 at 6:42 AM, Michiel Bustraan <span dir="ltr">
<<a href="mailto:michiel.bustraan@astro.su.se" target="_blank">michiel.bustraan@astro.su.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p></p>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
Jonathan,<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
I replied to your email, but did not include the flash-users in the reply, so you might not have received my mail.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
I'm sending this email that contains the same text. My apologies if you did receive the first one and have simply not yet replied.<br>
</div>
<span>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
I copied the cooling code from the supplementary units and put it into the source code, and included it with the modified setup command.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
When running, the code recognizes the useCool command in the flash.par.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
However, when running the code, the cooling doesn't seem to do anything, and there is no indication that cooling is being taken into account (in terms of timesteps or a statement when running the code). While the code is included in the compilation (since there
was actually a minor error that I had to fix before I could compile) it doesn't look like the cooling is being calculated. Another sign of this is that I first forgot to include the cooling function data file, but got no error message at runtime.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
So I'm not sure where the problem lies, but maybe your experience with the module can shed some light on the matter.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
Kind Regards,<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;margin-top:0px;margin-bottom:0px">
Michiel Bustraan<br>
</div>
<p><br>
</p>
</span>
<div style="color:rgb(33,33,33)"><span>
<hr style="display:inline-block;width:98%">
<div id="m_5930336468602795371m_-5937992789849139360m_-6386757164651713271divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b>
<a href="mailto:flash-users-bounces@flash.uchicago.edu" target="_blank">flash-users-bounces@flash.uchi<wbr>cago.edu</a> <<a href="mailto:flash-users-bounces@flash.uchicago.edu" target="_blank">flash-users-bounces@flash.uch<wbr>icago.edu</a>> on behalf of Slavin,
Jonathan <<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>><br>
<b>Sent:</b> Friday, October 7, 2016 7:33 PM<br>
<b>To:</b> flash-users<br>
<b>Subject:</b> Re: [FLASH-USERS] flash-users Digest, Vol 108, Issue 7</font>
<div> </div>
</div>
</span>
<div>
<div class="m_5930336468602795371m_-5937992789849139360h5">
<div>
<div dir="ltr">
<div style="font-family:arial,helvetica,sans-serif">Hi Michiel,</div>
<div style="font-family:arial,helvetica,sans-serif"><br>
</div>
<div style="font-family:arial,helvetica,sans-serif">I have used the SutherlandDopita formulation of optically thin radiative cooling with FLASH 4.3 and it does work. I don't recall off the top of my head if I needed to do anything special
to make it work. You do need to get the cooling function data files, though a little googling will get you to Ralph Sutherland's site where they can be downloaded. And you'll have to supply certain parameters in your flash.par including the path to the data
file (as cool_fctn_file) and useCool = .true. Also you'll need to supply the correct switch to setup:</div>
<div><font face="arial, helvetica, sans-serif">-unit=physics/sourceTerms/Cool<wbr>/CoolMain/SutherlandDopita</font><br>
</div>
<div><font face="arial, helvetica, sans-serif">I think that's all. If you run into trouble, ask me and I'll try to help.</font></div>
<div><font face="arial, helvetica, sans-serif"><br>
</font></div>
<div><font face="arial, helvetica, sans-serif">Regards,</font></div>
<div><font face="arial, helvetica, sans-serif">Jon</font></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Oct 7, 2016 at 1:00 PM, <span dir="ltr"><<a href="mailto:flash-users-request@flash.uchicago.edu" target="_blank">flash-users-request@flash.uch<wbr>icago.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Send flash-users mailing list submissions to<br>
<a href="mailto:flash-users@flash.uchicago.edu" target="_blank">flash-users@flash.uchicago.edu</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://flash.uchicago.edu/mailman/listinfo/flash-users" rel="noreferrer" target="_blank">
http://flash.uchicago.edu/mail<wbr>man/listinfo/flash-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:flash-users-request@flash.uchicago.edu" target="_blank">flash-users-request@flash.uchi<wbr>cago.edu</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:flash-users-owner@flash.uchicago.edu" target="_blank">flash-users-owner@flash.uchica<wbr>go.edu</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of flash-users digest..."<br>
<br>
Today's Topics:<br>
<br>
1. Re: Optically Thin Cooling (Klaus Weide)<br>
<br>
<br>
---------- Forwarded message ----------<br>
From: Klaus Weide <<a href="mailto:klaus@flash.uchicago.edu" target="_blank">klaus@flash.uchicago.edu</a>><br>
To: Michiel Bustraan <<a href="mailto:michiel.bustraan@astro.su.se" target="_blank">michiel.bustraan@astro.su.se</a>><br>
Cc: "<a href="mailto:flash-users@flash.uchicago.edu" target="_blank">flash-users@flash.uchicag<wbr>o.edu</a>" <<a href="mailto:flash-users@flash.uchicago.edu" target="_blank">flash-users@flash.uchicago.ed<wbr>u</a>><br>
Date: Thu, 6 Oct 2016 14:15:45 -0500 (CDT)<br>
Subject: Re: [FLASH-USERS] Optically Thin Cooling<br>
On Thu, 6 Oct 2016, Michiel Bustraan wrote:<br>
<br>
> I noticed that the current FLASH userguide refers to a Cooling module which only contains stub level routines (the files themselves don't seem to do anything).<br>
><br>
> However, in a userguide for FLASH2.5, there is a more detailed description of the optically thin Cooling module.<br>
><br>
><br>
> Is FLASH still capable of modelling optically thin radiative losses?<br>
<br>
You should get the collection<br>
<br>
FLASH4.2.2_supplementary_units<wbr>.tar.gz<br>
<br>
available from the code support page at<br>
<br>
<a href="http://flash.uchicago.edu/site/flashcode/" rel="noreferrer" target="_blank">
http://flash.uchicago.edu/site<wbr>/flashcode/</a><br>
<br>
(You should find a link there under DOWNLOADS).<br>
<br>
You will find several implementations of CoolMain in there. I believe<br>
these are implementations that were ported from FLASH2 to FLASH3 at some<br>
point in time, and have had some minor updates for FLASH4, but have not<br>
been used or tested (at least at the Flash Center) since then.<br>
<br>
Klaus<br>
<br>
<br>
______________________________<wbr>_________________<br>
flash-users mailing list<br>
<a href="mailto:flash-users@flash.uchicago.edu" target="_blank">flash-users@flash.uchicago.edu</a><br>
<a href="http://flash.uchicago.edu/mailman/listinfo/flash-users" rel="noreferrer" target="_blank">http://flash.uchicago.edu/mail<wbr>man/listinfo/flash-users</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="m_5930336468602795371m_-5937992789849139360m_-6386757164651713271gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">______________________________<wbr>__________________________<br>
Jonathan D. Slavin Harvard-Smithsonian CfA<br>
<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a> 60 Garden Street, MS 83<br>
phone: <a href="tel:%28617%29%20496-7981" value="+16174967981" target="_blank">(617) 496-7981</a> Cambridge, MA 02138-1516<br>
cell: <a href="tel:%28781%29%20363-0035" value="+17813630035" target="_blank">(781) 363-0035</a> USA<br>
______________________________<wbr>__________________________<br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="m_5930336468602795371m_-5937992789849139360gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">______________________________<wbr>__________________________<br>
Jonathan D. Slavin Harvard-Smithsonian CfA<br>
<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a> 60 Garden Street, MS 83<br>
phone: <a href="tel:%28617%29%20496-7981" value="+16174967981" target="_blank">(617) 496-7981</a> Cambridge, MA 02138-1516<br>
cell: <a href="tel:%28781%29%20363-0035" value="+17813630035" target="_blank">(781) 363-0035</a> USA<br>
______________________________<wbr>__________________________<br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="m_5930336468602795371gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">______________________________<wbr>__________________________<br>
Jonathan D. Slavin Harvard-Smithsonian CfA<br>
<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a> 60 Garden Street, MS 83<br>
phone: <a href="tel:%28617%29%20496-7981" value="+16174967981" target="_blank">(617) 496-7981</a> Cambridge, MA 02138-1516<br>
cell: <a href="tel:%28781%29%20363-0035" value="+17813630035" target="_blank">(781) 363-0035</a> USA<br>
______________________________<wbr>__________________________<br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">________________________________________________________<br>Jonathan D. Slavin Harvard-Smithsonian CfA<br><a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a> 60 Garden Street, MS 83<br>phone: (617) 496-7981 Cambridge, MA 02138-1516<br>cell: (781) 363-0035 USA<br>________________________________________________________<br><br></div></div></div></div>
</div></div>