Opened 3 years ago

Closed 3 years ago

#309 closed defect - wrong answer (fixed)

line emissivity not zeroed when ion is trimmed off

Reported by: peter Owned by: nobody
Priority: blocker Milestone: C17_branch
Component: radiative transfer Version: trunk
Keywords: Cc:

Description (last modified by peter)

When an ion is trimmed away, the emissivities of the lines coming from that ion are not zeroed. This is a problem for the "save line emissivity" command since it keeps reading the emissivities and therefore keeps repeating the emissivity from the last zone where the ion was still active.

The simplest solution seems to be to zero all emissivities prior to starting a new zone in ZoneStart(), but this has not been tested for side effects. Applying this fix had the surprising result that the reported pressure changed significantly in the output. With the attached input script, the radiation pressure in the first zone of the first iteration changed from P(Radtn) 7.58e-11 in the output posted by Janet to P(Radtn) 3.95e-09 in the patched output.

Problem reported by Janet Simpson.

Attachments (4)

bb_1000.in (2.0 KB) - added by peter 3 years ago.
input script
patch (828 bytes) - added by peter 3 years ago.
preliminary patch, not thoroughly tested!
bb_1000_15.in (1.6 KB) - added by rjrw 3 years ago.
Modified version of input for trunk / C15
patch_15 (821 bytes) - added by rjrw 3 years ago.
Modified version of patch for trunk/

Download all attachments as: .zip

Change History (9)

Changed 3 years ago by peter

Attachment: bb_1000.in added

input script

Changed 3 years ago by peter

Attachment: patch added

preliminary patch, not thoroughly tested!

comment:1 Changed 3 years ago by peter

Description: modified (diff)

comment:2 Changed 3 years ago by peter

PS - the patch was applied to c13_branch@9826, but the bug also exists on the trunk and should be fixed there first.

comment:3 Changed 3 years ago by peter

Priority: majorblocker

Changed 3 years ago by rjrw

Attachment: bb_1000_15.in added

Modified version of input for trunk / C15

Changed 3 years ago by rjrw

Attachment: patch_15 added

Modified version of patch for trunk/

comment:4 Changed 3 years ago by rjrw

Modified patch for trunk / C15 appears to deal with the problem without affecting P(Radtn): P(Radtn)=5.08e-11 in zone 1 both with and without the patch, and I can't see how changing emslin will change anything.

Any run time impact of this change appears negligible (~0.1% on the runs I did is well within timing noise).

comment:5 Changed 3 years ago by rjrw

Resolution: fixed
Status: newclosed

Fixed on the trunk r9925 and c13_branch r9926.

Note: See TracTickets for help on using tickets.