save heating, "adve"

35 views
Skip to first unread message

Marios Chatzikos

unread,
Oct 30, 2020, 5:41:16 PM10/30/20
to cloud...@googlegroups.com
Hello,

In cooling simulations, the behaviour of the 'save heating' command is
confusing, and I'd like to ask if there is a reason for it.

It is best to show a couple of examples:

5.00000e-01     3.3992e+07      3.7063e-33      7.7555e-26 adve   
103822704640.0000000    ChaT    0.9999998
5.00000e-01     4.0148e+00      2.1895e-47      3.4655e-33 adve   
4780677631311872.0000000        Hion    0.9273355 Hlin    0.0124077

After the first four numbers, each component is identified by a label,
and its fractional contribution to the total heating. Here, "adve"
identifies the advective cooling, and its contribution is >> 100%.  This
component is removed from the total at the beginning of SaveHeat() in
heat_save.cpp:

 31         /* >>chng 06 mar 17, comment out following block and
replace with this
 32          * removing dynamics heating & cooling and report only physical
 33          * heating and cooling
 34          * NB the heating and cooling as punched no longer need be
 35          * equal for a converged model */
 36         cool_total -= dynamics.Cool();
 37         heat_total -= dynamics.Heat();

in line 37.  The code snippet is familiar to all, I'm sure.

However, the output is confusing. Most likely it is an oversight that
the advective component is still reported, given that it is omitted from
the total tally.  Please let me know if you remember the history of how
this came about.

Unless there are any objections, I will remove "adve" from the list of
reported components.

Thanks,

Marios

Marios Chatzikos

unread,
Oct 31, 2020, 2:19:06 PM10/31/20
to cloud...@googlegroups.com
Attached is the proposed patch.  The first change addresses the previous
e-mail.  The second is essentially a bug fix, to force the code to
comply with how it is advertised in Hazy1: "The faintest agent saved is
normally 0.05 of the total and can be reset with the set WeakHeatCool
command."  The previous coding allowed for fainter heating agents to be
reported.
save-heating.patch

Robin Williams

unread,
Nov 1, 2020, 4:11:46 AM11/1/20
to cloud...@googlegroups.com
As I recall, it was never obvious what to do about this.  As you've observed, including the value for this non-radiative term seems confusing in isolation.  However leaving it out means the accountancy of heating and cooling terms doesn't balance -- I think this stayed among the reported values because this was the bigger concern.

Adiabatic heating/cooling is definitely a thing (i.e. the work done by compressing/expanding a material).  The advective sources/sinks combine this with the overall heating/cooling of the system, as you can see most easily if you consider time-dependent cooling single static zone.

  Robin


--
--
http://groups.google.com/group/cloudy-dev
---
You received this message because you are subscribed to the Google Groups "cloudy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloudy-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudy-dev/8fdff4b0-db9d-490b-a411-9c938ca974ae%40gmail.com.

Marios Chatzikos

unread,
Nov 1, 2020, 8:22:14 AM11/1/20
to cloud...@googlegroups.com

Hi Robin,

I understand the physics.  My concern is geared toward user expectations, especially after reading Hazy.

Dynamical cooling and heating are removed prior to any output, in this function.  If they are important enough to report, we should not omit them.  If they can be omitted, we should not report them.  The current status is confusing.

If we do report them, we may want to consider changing the WeakHeatCool limit, or nothing else will get reported (but maybe that's okay).

Thanks,

Marios

Gary J. Ferland

unread,
Nov 1, 2020, 8:40:59 AM11/1/20
to cloud...@googlegroups.com
why not leave the functional code the same but report both versions in the output, and carefully document why they are different?



--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary

Marios Chatzikos

unread,
Nov 1, 2020, 8:57:44 AM11/1/20
to 'Robin Williams' via cloudy-dev
So, for each zone/timestep, there will be two lines of output in the file?  Even if it is documented, wouldn't that make the output more confusing?  And Hazy mandatory reading?

Gary Ferland

unread,
Nov 1, 2020, 10:45:46 AM11/1/20
to cloudy-dev
why not add another column to the output?

Maybe hazy should follow the code rather than the code follow hazy?  Most likely the code was originally as documented but someone needed fainter contributors and changed the source but not the documentation. 

Marios Chatzikos

unread,
Nov 1, 2020, 12:31:19 PM11/1/20
to 'Robin Williams' via cloudy-dev
What would the extra column report?  The advective heating?  And in non-dynamical sims, it is omitted?

Gary J. Ferland

unread,
Nov 1, 2020, 12:35:39 PM11/1/20
to cloud...@googlegroups.com
On Sun, Nov 1, 2020 at 12:31 PM Marios Chatzikos <mchat...@gmail.com> wrote:
What would the extra column report?  The advective heating? 

there are good cases to be made for reporting both sums of the heating.  I still recall the original discussion on this ten years ago. The current status is the compromise that was reached.  
And in non-dynamical sims, it is omitted?

too complicated - simplicity is very important.  just report zero and document in hazy.

thanks,
Gary

Marios Chatzikos

unread,
Nov 1, 2020, 8:26:12 PM11/1/20
to 'Robin Williams' via cloudy-dev
I can add a column for the advective heating in the output of 'save heating', and one for advective cooling in the output of 'save cooling'.  But I'd exclude the advective terms from the total heating/cooling to keep the fractional contribution of the other components printable.  The current limit is 5%, so the advective heating would be the only thing printed regardless of the temperature in the simulations I've been running.

Marios Chatzikos

unread,
Nov 2, 2020, 10:38:46 AM11/2/20
to cloud...@googlegroups.com

I attach another patch on this.  It adds a column in each of the 'save heating/cooling' output which reports the relevant advective term (heating, cooling, resp.), not the total including that term.  Hazy1 is updated to reflect these changes.

Let me know if you have any comments.

Marios

save-heating-cooling.patch

Marios Chatzikos

unread,
Nov 5, 2020, 7:45:33 AM11/5/20
to cloud...@googlegroups.com

Hi,

I haven't heard anything on this patch.  Should I assume it is all good, and commit it?

Thanks,

Marios

Gary J. Ferland

unread,
Nov 5, 2020, 9:34:03 AM11/5/20
to cloud...@googlegroups.com
Hi Marios,

it looks fine to me - thanks for doing this.

there have been no commits to the repo in the past ten days.  We should not commit to WebFaction since it is EOL.  UKy now forbids using a grant to do external hosting and say they will have Gitlab set up today.  

The situation is changing hourly.  I created backups of all four svn repositories yesterday evening.  I will recreate them on my local Ubuntu machine and the compressed svn dumps are saved in Dropbox here.  Please save the patches somewhere safe and apply them when we come out on the other side.

thanks,
Gary

Marios Chatzikos

unread,
Nov 5, 2020, 10:02:11 PM11/5/20
to cloud...@googlegroups.com

Hi Gary,

OK, no more commits until further notice.

I'm downloading the dumps for safekeeping.  I wonder if the wiki and the bug tracker should be among them...

Marios

Gary J. Ferland

unread,
Nov 5, 2020, 10:03:51 PM11/5/20
to cloud...@googlegroups.com
do you see how to dump them?

Will H had this all set up a year ago.  That discussion was all on GitHub IIRC.  Do you see how Will handled trac?

mchatzikos

unread,
Dec 7, 2020, 5:50:04 PM12/7/20
to cloudy-dev
Reply all
Reply to author
Forward
0 new messages