[FLASH-USERS] problems with cooling setup

Slavin, Jonathan jslavin at cfa.harvard.edu
Wed Nov 2 14:08:40 EDT 2016


Hi Michiel,

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
source/physics/sourceTerms/Cool/CoolMain/SutherlandDopita/

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.

Good luck,
Jon

On Wed, Nov 2, 2016 at 6:19 AM, Michiel Bustraan <
michiel.bustraan at astro.su.se> wrote:

> Jon,
>
>
> I tried simplifying the setup and possibly made some progress, though it
> still doesn't work.
>
> I originally kept the old cooling files in my sourceterms directory, but
> changed the name of the folder.
>
> 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.
>
>
> 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.
>
> So now in my setup I'm adding "physics/sourceTerms/Cool".
>
>
> 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:
>
>
> Driver_computeDt.o: In function `driver_computedt_':
> /home/mbust/FLASH4.3/coolsimulation/Driver_computeDt.F90:335: undefined
> reference to `cool_computedt_'
> Driver_finalizeSourceTerms.o: In function `driver_finalizesourceterms_':
> /home/mbust/FLASH4.3/coolsimulation/Driver_finalizeSourceTerms.F90:45:
> undefined reference to `cool_finalize_'
> Driver_initSourceTerms.o: In function `driver_initsourceterms_':
> /home/mbust/FLASH4.3/coolsimulation/Driver_initSourceTerms.F90:46:
> undefined reference to `cool_init_'
> Driver_sourceTerms.o: In function `driver_sourceterms_':
> /home/mbust/FLASH4.3/coolsimulation/Driver_sourceTerms.F90:61: undefined
> reference to `cool_'
> cool_integrate.o: In function `cool_integrate_':
> /home/mbust/FLASH4.3/coolsimulation/cool_integrate.F90:49: undefined
> reference to `cool_deriv_'
> /home/mbust/FLASH4.3/coolsimulation/cool_integrate.F90:53: undefined
> reference to `cool_deriv_'
> /home/mbust/FLASH4.3/coolsimulation/cool_integrate.F90:57: undefined
> reference to `cool_deriv_'
> /home/mbust/FLASH4.3/coolsimulation/cool_integrate.F90:62: undefined
> reference to `cool_deriv_'
> collect2: error: ld returned 1 exit status
> make: *** [flash4] Error 1
>
> 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.
> 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 -unit=physics/
> sourceTerms/Cool/CoolMain/SutherlandDopita​ in the setup).
>
> 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.
> This issue didn't happen when the old cooling files were still in the
> sourceTerms directory under a different name.
>
> Kind Regards,
> Michiel
>
>
> ------------------------------
> *From:* Slavin, Jonathan <jslavin at cfa.harvard.edu>
> *Sent:* Monday, October 31, 2016 5:22 PM
>
> *To:* Michiel Bustraan
> *Subject:* Re: [FLASH-USERS] flash-users Digest, Vol 108, Issue 7
>
> Hi Michiel,
>
> 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/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
> -unit=physics/sourceTerms/Cool/CoolMain/SutherlandDopita
> as an argument to setup.  There is a Cool_init.F90 file in that
> SutherlandDopita directory.
>
> You do need to give the full path for the cooling function file, I think.
>
> Regards,
> Jon
>
> On Mon, Oct 31, 2016 at 11:50 AM, Michiel Bustraan <
> michiel.bustraan at astro.su.se> wrote:
>
>> Jon,
>>
>>
>> When adding the supplementary unit to the code, I simply copied the
>> entire Cool folder in place of the existing one (which did nothing).
>>
>>
>> When setting up the simulation, I got an error message:
>>
>>
>> WARNING: Missing 'init' File
>>     Each API-level unit directory must directly contain an initialization
>> file
>>     whose name matches the name of that directory plus "_init.F90"
>>     The directory "physics/sourceTerms/Cool" does not contain a file
>>     "Cool_init.F90"
>>
>> That file is missing because the cooling I was using is located in (as
>> listed in the log file):
>>
>> physics/sourceTerms/Cool/CoolMain/SutherlandDopita​
>>
>> So I assumed it wouldn't be an issue. Could this be the problem?
>> Regarding the runtimeparameters, usecool was set to true, though changing
>> it to false doesn't change the results.
>> cool_fctn_file is simply the file (mzero.cie), since I added it to the
>> simulation folder.
>>
>> When running the code, there is no output that indicates that cooling is
>> being calculated.
>> No relevant messages at the start, no visible calculation of the cooling
>> timestep.
>>
>> Kind Regards,
>> Michiel
>>
>>
>> ------------------------------
>> *From:* Slavin, Jonathan <jslavin at cfa.harvard.edu>
>> *Sent:* Monday, October 31, 2016 4:21 PM
>> *To:* Michiel Bustraan
>>
>> *Subject:* Re: [FLASH-USERS] flash-users Digest, Vol 108, Issue 7
>>
>> Hi Michiel,
>>
>> 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:
>> init_cool:  attempting to read cooling function file ...
>> where ... should show the file name being read?
>>
>> Regards,
>> Jon
>>
>> On Mon, Oct 31, 2016 at 6:42 AM, Michiel Bustraan <
>> michiel.bustraan at astro.su.se> wrote:
>>
>>> ​Jonathan,
>>>
>>> I replied to your email, but did not include the flash-users in the
>>> reply, so you might not have received my mail.
>>> 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.
>>>
>>> I copied the cooling code from the supplementary units and put it into
>>> the source code, and included it with the modified setup command.
>>> When running, the code recognizes the useCool command in the flash.par.
>>>
>>> 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.
>>>
>>> So I'm not sure where the problem lies, but maybe your experience with
>>> the module can shed some light on the matter.
>>>
>>> Kind Regards,
>>> Michiel Bustraan​
>>>
>>>
>>> ------------------------------
>>> *From:* flash-users-bounces at flash.uchicago.edu <
>>> flash-users-bounces at flash.uchicago.edu> on behalf of Slavin, Jonathan <
>>> jslavin at cfa.harvard.edu>
>>> *Sent:* Friday, October 7, 2016 7:33 PM
>>> *To:* flash-users
>>> *Subject:* Re: [FLASH-USERS] flash-users Digest, Vol 108, Issue 7
>>>
>>> Hi Michiel,
>>>
>>> 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:
>>> -unit=physics/sourceTerms/Cool/CoolMain/SutherlandDopita
>>> I think that's all.  If you run into trouble, ask me and I'll try to
>>> help.
>>>
>>> Regards,
>>> Jon
>>>
>>> On Fri, Oct 7, 2016 at 1:00 PM, <flash-users-request at flash.uchicago.edu>
>>> wrote:
>>>
>>>> Send flash-users mailing list submissions to
>>>>         flash-users at flash.uchicago.edu
>>>>
>>>> To subscribe or unsubscribe via the World Wide Web, visit
>>>>         http://flash.uchicago.edu/mailman/listinfo/flash-users
>>>> or, via email, send a message with subject or body 'help' to
>>>>         flash-users-request at flash.uchicago.edu
>>>>
>>>> You can reach the person managing the list at
>>>>         flash-users-owner at flash.uchicago.edu
>>>>
>>>> When replying, please edit your Subject line so it is more specific
>>>> than "Re: Contents of flash-users digest..."
>>>>
>>>> Today's Topics:
>>>>
>>>>    1. Re:  Optically Thin Cooling (Klaus Weide)
>>>>
>>>>
>>>> ---------- Forwarded message ----------
>>>> From: Klaus Weide <klaus at flash.uchicago.edu>
>>>> To: Michiel Bustraan <michiel.bustraan at astro.su.se>
>>>> Cc: "flash-users at flash.uchicago.edu" <flash-users at flash.uchicago.edu>
>>>> Date: Thu, 6 Oct 2016 14:15:45 -0500 (CDT)
>>>> Subject: Re: [FLASH-USERS] Optically Thin Cooling
>>>> On Thu, 6 Oct 2016, Michiel Bustraan wrote:
>>>>
>>>> > 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).
>>>> >
>>>> > However, in a userguide for FLASH2.5, there is a more detailed
>>>> description of the optically thin Cooling module.
>>>> >
>>>> >
>>>> > Is FLASH still capable of modelling optically thin radiative losses?
>>>>
>>>> You should get the collection
>>>>
>>>>   FLASH4.2.2_supplementary_units.tar.gz
>>>>
>>>> available from the code support page at
>>>>
>>>>   http://flash.uchicago.edu/site/flashcode/
>>>>
>>>> (You should find a link there under DOWNLOADS).
>>>>
>>>> You will find several implementations of CoolMain in there. I believe
>>>> these are implementations that were ported from FLASH2 to FLASH3 at some
>>>> point in time, and have had some minor updates for FLASH4, but have not
>>>> been used or tested (at least at the Flash Center) since then.
>>>>
>>>> Klaus
>>>>
>>>>
>>>> _______________________________________________
>>>> flash-users mailing list
>>>> flash-users at flash.uchicago.edu
>>>> http://flash.uchicago.edu/mailman/listinfo/flash-users
>>>>
>>>>
>>>
>>>
>>> --
>>> ________________________________________________________
>>> Jonathan D. Slavin                 Harvard-Smithsonian CfA
>>> jslavin at cfa.harvard.edu       60 Garden Street, MS 83
>>> phone: (617) 496-7981       Cambridge, MA 02138-1516
>>> cell: (781) 363-0035             USA
>>> ________________________________________________________
>>>
>>>
>>
>>
>> --
>> ________________________________________________________
>> Jonathan D. Slavin                 Harvard-Smithsonian CfA
>> jslavin at cfa.harvard.edu       60 Garden Street, MS 83
>> phone: (617) 496-7981       Cambridge, MA 02138-1516
>> cell: (781) 363-0035             USA
>> ________________________________________________________
>>
>>
>
>
> --
> ________________________________________________________
> Jonathan D. Slavin                 Harvard-Smithsonian CfA
> jslavin at cfa.harvard.edu       60 Garden Street, MS 83
> phone: (617) 496-7981       Cambridge, MA 02138-1516
> cell: (781) 363-0035             USA
> ________________________________________________________
>
>


-- 
________________________________________________________
Jonathan D. Slavin                 Harvard-Smithsonian CfA
jslavin at cfa.harvard.edu       60 Garden Street, MS 83
phone: (617) 496-7981       Cambridge, MA 02138-1516
cell: (781) 363-0035             USA
________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20161102/85fa5b3c/attachment.htm>


More information about the flash-users mailing list