cloudy-astrophysics / bug-tracker-migration-test

Trial run for importing the nublado.org Trac tickets as GitHub issues
0 stars 0 forks source link

user sim does not conserve energy (trac #254) #256

Open cloudy-bot opened 11 years ago

cloudy-bot commented 11 years ago

reported by: @CloudyLex

user alexei.baskin on yahoo reported following on 2013 Jan 13:

Hello,

I have encountered a peculiar pressure convergence failure in 
Cloudy v10.00. For several zones, the code “locks” onto a large 
pressure oscillation, and fails to converge. An example is 
described below, using the attached files:

debug-8-3-8.out – the code output
debug-8-3-8.hist – pressure history
debug-8-3-8.temp – temperature history
debug-8-3-8.line.press – line pressure

For 2 iteration, zone 407 (i.e., the last zone calculated by the 
code) the current pressure jumps repeatedly between ~4.6e1 and 
6.5e-1 (see debug-8-3-8.hist, line 6628 onward). The current 
pressure jumps, while the evaluated density and temperature stay 
approximately constant, ~6.7e9 and 3e5, respectively (for 
temperature, see debug-8-3-8.temp, line 28619 onward).

I think that the problem is in the evaluated line pressure. Looking 
at the line pressure output (debug-8-3-8.line.press, starting from 
line 1174), it appears there are two distinct line pressure cases 
for adjacent zones. The first case (probably the correct one) has 
line pressure which is ~5% from the total pressure, and Cloudy 
lists the contributing lines. The second case (probably the 
erroneous one) has line pressure that is ~99% from the total 
pressure, but Cloudy does not list any contributor.

Note that the occurrence of convergence failure somehow depends on 
the particular stopping criterion, which is found beyond the 
problematic zone (i.e., deeper into the slab). For example, if the 
attached model is ran with “stop temperature 1e5K” as the stopping 
criterion, the pressure does converge.

Is it a problem in the code, or am I doing something wrong?

Alexei Baskin

This was with C10. With C13 at r7213 we do not conserve energy:


 badprt: all entries with greater than  2.00% of incident continuum follow.
 badprt: Intensities are relative to total energy in incident continuum.
 Sum of energy in recombination lines is 7.87e+09 relative to total incident radiation is 1.43e-02
 all strong information lines 
 line  wl  ener/total
 all strong cooling lines 
 line  wl  ener/total
 Sum of coolants (abs) = 1.89e+12 (rel)= 3.44e+00
 HFBc     0    0.850 c
 Hind     0    0.440 c
 HFFc     0    0.325 c
 MeFB     0    0.023 c
 Clin 912.0A   0.130 c
 CION     0    0.388 c
 Clin 506.0A   0.029 c
 Fe2c     0    0.791 c
 H-FB     0    0.291 c
 H2+      0    0.145 c
 all strong heating lines 
 line  wl  ener/total
 Sum of heat (abs) = 2.32e+12 (rel)= 4.22e+00
 BFH1     0    1.912 h
 BFHe     0    0.195 h
 TotM     0    0.307 h
 CT H     0    0.039 h
 Hlin 912.0A   1.502 h
 H- H     0    0.248 h

Migrated from https://www.nublado.org/ticket/254

{
    "status": "new",
    "changetime": "2019-02-04T13:07:06Z",
    "_ts": "1549285626580696",
    "description": "user alexei.baskin on yahoo reported following on 2013 Jan 13:\n{{{\nHello,\n\nI have encountered a peculiar pressure convergence failure in \nCloudy v10.00. For several zones, the code \u201clocks\u201d onto a large \npressure oscillation, and fails to converge. An example is \ndescribed below, using the attached files:\n \ndebug-8-3-8.out \u2013 the code output\ndebug-8-3-8.hist \u2013 pressure history\ndebug-8-3-8.temp \u2013 temperature history\ndebug-8-3-8.line.press \u2013 line pressure\n\nFor 2 iteration, zone 407 (i.e., the last zone calculated by the \ncode) the current pressure jumps repeatedly between ~4.6e1 and \n6.5e-1 (see debug-8-3-8.hist, line 6628 onward). The current \npressure jumps, while the evaluated density and temperature stay \napproximately constant, ~6.7e9 and 3e5, respectively (for \ntemperature, see debug-8-3-8.temp, line 28619 onward).\n\nI think that the problem is in the evaluated line pressure. Looking \nat the line pressure output (debug-8-3-8.line.press, starting from \nline 1174), it appears there are two distinct line pressure cases \nfor adjacent zones. The first case (probably the correct one) has \nline pressure which is ~5% from the total pressure, and Cloudy \nlists the contributing lines. The second case (probably the \nerroneous one) has line pressure that is ~99% from the total \npressure, but Cloudy does not list any contributor.\n\nNote that the occurrence of convergence failure somehow depends on \nthe particular stopping criterion, which is found beyond the \nproblematic zone (i.e., deeper into the slab). For example, if the \nattached model is ran with \u201cstop temperature 1e5K\u201d as the stopping \ncriterion, the pressure does converge.\n\nIs it a problem in the code, or am I doing something wrong?\n\nAlexei Baskin\n}}}\n\n-----\n\nThis was with C10.  With C13 at r7213 we do not conserve energy:\n{{{\n\n badprt: all entries with greater than  2.00% of incident continuum follow.\n badprt: Intensities are relative to total energy in incident continuum.\n Sum of energy in recombination lines is 7.87e+09 relative to total incident radiation is 1.43e-02\n all strong information lines \n line  wl  ener/total\n all strong cooling lines \n line  wl  ener/total\n Sum of coolants (abs) = 1.89e+12 (rel)= 3.44e+00\n HFBc     0    0.850 c\n Hind     0    0.440 c\n HFFc     0    0.325 c\n MeFB     0    0.023 c\n Clin 912.0A   0.130 c\n CION     0    0.388 c\n Clin 506.0A   0.029 c\n Fe2c     0    0.791 c\n H-FB     0    0.291 c\n H2+      0    0.145 c\n all strong heating lines \n line  wl  ener/total\n Sum of heat (abs) = 2.32e+12 (rel)= 4.22e+00\n BFH1     0    1.912 h\n BFHe     0    0.195 h\n TotM     0    0.307 h\n CT H     0    0.039 h\n Hlin 912.0A   1.502 h\n H- H     0    0.248 h\n}}}",
    "reporter": "gary",
    "cc": "",
    "resolution": "",
    "time": "2013-02-02T23:13:59Z",
    "component": "etc",
    "summary": "user sim does not conserve energy",
    "priority": "major",
    "keywords": "",
    "version": "trunk",
    "milestone": "no milestone",
    "owner": "nobody",
    "type": "defect - convergence"
}
cloudy-bot commented 11 years ago

slightly modified version of original post Attachment: u8.in

cloudy-bot commented 11 years ago

@CloudyLex changed description from:

user alexei.baskin on yahoo reported following on 2013 Jan 13:

Hello,

I have encountered a peculiar pressure convergence failure in Cloudy v10.00. For several zones, the code “locks” onto a large pressure oscillation, and fails to converge. An example is described below, using the attached files:

debug-8-3-8.out – the code output
debug-8-3-8.hist – pressure history
debug-8-3-8.temp – temperature history
debug-8-3-8.line.press – line pressure

For 2 iteration, zone 407 (i.e., the last zone calculated by the code) the current pressure jumps repeatedly between ~4.6e1 and 6.5e-1 (see debug-8-3-8.hist, line 6628 onward). The current pressure jumps, while the evaluated density and temperature stay approximately constant, ~6.7e9 and 3e5, respectively (for temperature, see debug-8-3-8.temp, line 28619 onward).

I think that the problem is in the evaluated line pressure. Looking at the line pressure output (debug-8-3-8.line.press, starting from line 1174), it appears there are two distinct line pressure cases for adjacent zones. The first case (probably the correct one) has line pressure which is ~5% from the total pressure, and Cloudy lists the contributing lines. The second case (probably the erroneous one) has line pressure that is ~99% from the total pressure, but Cloudy does not list any contributor.

Note that the occurrence of convergence failure somehow depends on the particular stopping criterion, which is found beyond the problematic zone (i.e., deeper into the slab). For example, if the attached model is ran with “stop temperature 1e5K” as the stopping criterion, the pressure does converge.

Is it a problem in the code, or am I doing something wrong?

Alexei Baskin

This was with C10. With C13 at r7213 we do not conserve energy:


 badprt: all entries with greater than  2.00% of incident continuum follow.
 badprt: Intensities are relative to total energy in incident continuum.
 Sum of energy in recombination lines is 7.87e+09 relative to total incident radiation is 1.43e-02
 all strong information lines 
 line  wl  ener/total
 all strong cooling lines 
 line  wl  ener/total
 Sum of coolants (abs) = 1.89e+12 (rel)= 3.44e+00
 HFBc     0    0.850 c
 Hind     0    0.440 c
 HFFc     0    0.325 c
 MeFB     0    0.023 c
 Clin 912.0A   0.130 c
 CION     0    0.388 c
 Clin 506.0A   0.029 c
 Fe2c     0    0.791 c
 H-FB     0    0.291 c
 H2+      0    0.145 c
 all strong heating lines 
 line  wl  ener/total
 Sum of heat (abs) = 2.32e+12 (rel)= 4.22e+00
 BFH1     0    1.912 h
 BFHe     0    0.195 h
 TotM     0    0.307 h
 CT H     0    0.039 h
 Hlin 912.0A   1.502 h
 H- H     0    0.248 h

to:

user alexei.baskin on yahoo reported following on 2013 Jan 13:

Hello,

I have encountered a peculiar pressure convergence failure in 
Cloudy v10.00. For several zones, the code “locks” onto a large 
pressure oscillation, and fails to converge. An example is 
described below, using the attached files:

debug-8-3-8.out – the code output
debug-8-3-8.hist – pressure history
debug-8-3-8.temp – temperature history
debug-8-3-8.line.press – line pressure

For 2 iteration, zone 407 (i.e., the last zone calculated by the 
code) the current pressure jumps repeatedly between ~4.6e1 and 
6.5e-1 (see debug-8-3-8.hist, line 6628 onward). The current 
pressure jumps, while the evaluated density and temperature stay 
approximately constant, ~6.7e9 and 3e5, respectively (for 
temperature, see debug-8-3-8.temp, line 28619 onward).

I think that the problem is in the evaluated line pressure. Looking 
at the line pressure output (debug-8-3-8.line.press, starting from 
line 1174), it appears there are two distinct line pressure cases 
for adjacent zones. The first case (probably the correct one) has 
line pressure which is ~5% from the total pressure, and Cloudy 
lists the contributing lines. The second case (probably the 
erroneous one) has line pressure that is ~99% from the total 
pressure, but Cloudy does not list any contributor.

Note that the occurrence of convergence failure somehow depends on 
the particular stopping criterion, which is found beyond the 
problematic zone (i.e., deeper into the slab). For example, if the 
attached model is ran with “stop temperature 1e5K” as the stopping 
criterion, the pressure does converge.

Is it a problem in the code, or am I doing something wrong?

Alexei Baskin

This was with C10. With C13 at r7213 we do not conserve energy:


 badprt: all entries with greater than  2.00% of incident continuum follow.
 badprt: Intensities are relative to total energy in incident continuum.
 Sum of energy in recombination lines is 7.87e+09 relative to total incident radiation is 1.43e-02
 all strong information lines 
 line  wl  ener/total
 all strong cooling lines 
 line  wl  ener/total
 Sum of coolants (abs) = 1.89e+12 (rel)= 3.44e+00
 HFBc     0    0.850 c
 Hind     0    0.440 c
 HFFc     0    0.325 c
 MeFB     0    0.023 c
 Clin 912.0A   0.130 c
 CION     0    0.388 c
 Clin 506.0A   0.029 c
 Fe2c     0    0.791 c
 H-FB     0    0.291 c
 H2+      0    0.145 c
 all strong heating lines 
 line  wl  ener/total
 Sum of heat (abs) = 2.32e+12 (rel)= 4.22e+00
 BFH1     0    1.912 h
 BFHe     0    0.195 h
 TotM     0    0.307 h
 CT H     0    0.039 h
 Hlin 912.0A   1.502 h
 H- H     0    0.248 h
cloudy-bot commented 11 years ago

@CloudyLex commented:

further note on c13

Hi Gary,

A quick update regarding trying my sims on v13 RC1. I ran a sim with more (reasonable) 
AGN-like parameters i.e., log U=3 and log n=8. The code still fails to converge 
pressure on a second iteration. The pressure "oscillates" by a factor of ~4 between 1 
and 4, while density and temperature remain approximately constant (see for example 
last zone in the second iteration in the attached files). For this sim, the line 
pressure contribution to the total pressure jumps from ~30-50% to 90% in adjacent 
zones (see the end of line pressure file).

BTW, running the attached sim on v10 also fails, but this time because the calculation 
stops due to zone thickness becoming too thin.

Cheers,
Alexei Baskin
cloudy-bot commented 11 years ago

@peter-van-hoof-noaccount changed milestone from "" to "no milestone"