Repository navigation
fix(trx): the fusion rate path, one commit per defect (#234, #235, #236, #229, #268) - #269
HengyuLi-Ozaki-lab wants to merge 14 commits into
Conversation
) pm_local (MODULE libnf_local) was declared INTEGER and assigned PA(nsp_idnf(id_nf))*AMP, a mass of order 1e-27 kg, so it truncated to 0 and sigmav_nf_local's velocity=SQRT(2.D0*energy*RKEV/pm_local) divided by zero. Reached through sigmav_nf_int only; the model_pnf rate path (sigmav_nf) does not use it. Item 2 of k-yoshimi#234. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
As asked in the triage of k-yoshimi#234 item 3 (the phantom PUBLIC sigmav_nfb_int is not on develop): MODULE libnf_local and MODULE libnf get a module-level IMPLICIT NONE, so that a name declared nowhere is a compile error rather than an implicitly typed module variable. Every procedure of libnf already had its own. It compiles cleanly (gfortran 15, the trx build with the run-time checks of make.header's DFLAGS; no warning under -Wall -Wextra -Wconversion), and a model_pnf=0 run of the 10 keV D-T deck prints the same output as develop apart from the timing lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The svnf_* tables in trx/libnf.f90 are in cm^3/s: read that way the D-T table follows Bosch-Hale (Nucl. Fusion 32 (1992) 611) to 0.80-1.01 over 1-100 keV and peaks at 8.7e-16 cm^3/s. sigmav_nf returned them unconverted, while tr_pnf needs m^3/s (SNF = wgt*PN1*PN2*1.D20*RATE_NF with RN in 1e20 m^-3) and the menu's B command prints the value, so every model_pnf fusion rate was 1e6 too large. The same table in trm/libsigma.f90 is converted by both of its callers (*(1E-6)). One factor 1.D-6 at the function's single computed exit, which covers all five tables and every caller once; the branch below 1 keV returns 0 before it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
k-yoshimi#235) In tr_pnf's slowing-down loop, VF, TAUS and COULOG took PA(ns), PZ(ns) and COULOG(1,ns,...), where ns is the counter of the preceding DO NS=1,NSMAX loop and holds NSMAX+1 there: a slot outside the run's species (trinit sets PA = PZ = 1 there), not the fusion product. nsp = nsp_nnf(nnf), the product, is assigned one line above and was otherwise unused. Item 1 of k-yoshimi#235; item 3 of k-yoshimi#229. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tr_pnf zeroed four of its output arrays at entry but not PNF_NSNNFNR, which it then accumulates with `+` (PNF_NSNNFNR(nsp,nnf,nr) = PNF_NSNNFNR(nsp,nnf,nr) + eng*SNF*1.D20). tr_pnf runs once per TRCALC, several times per step, so the fusion power held the sum of every call of the run instead of the current one. Item 2 of k-yoshimi#235; item 2 of k-yoshimi#229. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PNFIN_NSNNFNR is allocated (trcomm.f90) but written nowhere; TRGLOB sums it into PNFIN_NSNR, PNFIN_NNFNR and PNFIN_NSNNF, so those read whatever the allocation held. It is now zeroed with the other outputs at the top of tr_pnf, so they read 0. Whether it should carry a value (as PNBIN_NNBNR does for NBI in trpnb.f90) is left open, as k-yoshimi#229 asks. Item 1 of k-yoshimi#229. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-yoshimi#235) The species-presence check had CASE(1,12,13) / CASE(2,3) / CASE(4). 13 is rejected earlier by the first SELECT CASE (CASE DEFAULT), so that label was dead, while 14, which the first two blocks accept (CASE(4,14), nnfmax=13) and the header documents, matched nothing here and reached CASE DEFAULT's STOP. model_pnf=14 indexes the same six species as 4: at this commit the only 14-specific remap in the file is the32's product (He4; the next commit makes dd3's another), and dd2, dhe32, the35 and the36 resolve to H and He5 for any model_pnf other than 12. So CASE(1,12) / CASE(2,3) / CASE(4,14). The message of that branch said libnb; it is libnf. Item 3 of k-yoshimi#235. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 12 and 14 (k-yoshimi#235) nsp_idnf(id_nf_dd3) was NS_He3 for model_pnf=12 and NS_He4 for every other model_pnf. dd3 is D + D -> He3 + n, and the header gives the two reduced variants the same DD3 line, "D + D -> He3 + n ! He4 + n" (12 and 14, nsmax=4): they collapse the He3 product onto He4. So 12 and 14 get He4, and the full variants 2, 3 and 4 He3. For 12 that is also the direction of its sibling remap (dd2 gives He4 to 12 and H otherwise). As written, a model_pnf=12 run, whose composition carries no He3 (the presence check asks for D, T and He4 only), took NS_He3 = 0 as the product index and stopped at an array bound (Index '0' of dimension 1 of snf_nsnnfnr, with run-time checks). model_pnf=14 keeps He4, as on develop. Its other remaps do not agree with each other (the32 treats it as reduced, giving He4; dd2, dhe32, the35 and the36 resolve as for the full variants, which is why the presence check is CASE(4,14)); that is left to the module lead. Kept as a commit of its own, as asked in the triage, so that it can be dropped without touching the rest. Related to item 3 of k-yoshimi#235. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…i#229) Inside the id_nf_dd2 block, enn_idnf(id_nf_dd3)=0.D0 cleared the neutron energy of the next channel (which the dd3 block then sets again) and left enn_idnf(id_nf_dd2) unassigned; tr_pnf compares it with 0 to decide whether the channel makes neutrons. dd2 (D + D -> T + p) has none: enn_idnf(id_nf_dd2)=0.D0. Item 4 of k-yoshimi#229. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eng_nnf is in joules already, and VF applied RKEV to it a second time. Found with the others while building the 1e-10 reference from trx, on the same line as item 1 of k-yoshimi#235, and filed afterwards as k-yoshimi#268. Kept as the last commit so that it can be dropped. VF = SQRT(2*eng_nnf*RKEV/(PA*AMP)) multiplied a joule value by RKEV again: eng_nnf(nnf) = eng_idnf(id_nf), which libnf sets in joules (eng_idnf(id_nf_dt) = 3.5D3*RKEV), and tr_pnf's own power line uses it as joules (PNF = eng*SNF*1.D20, W/m^3). VF came out at about 1.3e-8 of the alpha's speed (sqrt(RKEV)), so HY(VF/VCR) and TAUF were wrong; trx's NBI path converts once, from keV (VB = SQRT(2*PNBENG*RKEV/AMB)). VF = SQRT(2*eng_nnf/(PA(nsp)*AMP)). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
k-yoshimi
left a comment
There was a problem hiding this comment.
Review through the full cycle (Codex + in-house domain, test-oracle and verifier lenses + docs/workflow review), with trx/tr2 built here at develop, this head, #270 and the two merged (gfortran 15.2, the make.header run-time checks, graphics stubbed with tr/tr_static_stubs.f90).
Reproduction. Your deck with model_pnf=0 gives output identical to develop on this head, on #270 and on both merged (CPU-time lines stripped), and identical across repeated runs. With model_pnf=1: WPT 28.65 MJ, WTAILT 4.265e-2 MJ on this head; merged with #270, PINT 0.5393 MW, QF 1.294, TAUE1 53.13 s, TAUE2 1.518 s — your numbers to four digits. Every fix was traced independently: the tables are cm³/s (the trm sibling and trx/trsigmavnf.f90 apply the same 1e-6), eng_nnf is in J, the stale ns is NSMAX+1, tr_pnf runs at least three times per step so the accumulation was real, IMPLICIT NONE compiles clean, model_pnf=13 was already unreachable.
One change requested — 3953ef52, the CASE(4,14) label. Before this PR model_pnf=14 reached CASE DEFAULT and stopped. After it, 14 passes the presence check whenever D, T, He4, H and He3 are present, because NS_He5 is never a discovered index: pl/plinit.f90:122 sets it to the literal 7, tr_prep_ns (trx/trprep.f90:122-160) neither resets nor matches it, and pl_prep_ns (pl/plprep.f90:50-85) refuses an NPA=2, PA=5 species outright. So for 14 nsp_idnf(id_nf_the35) is 7 (libnf.f90:311) and tr_pnf writes SNF_NSNNFNR(7,…) / PNF_NSNNFNR(7,…) past the (NSMAX,NNFMAX,NRMAX) allocation (trx/trcomm.f90:686,688), and trexec.f90:568/643/720 read it back. Reachable from tr2 with a plparm file that defines He3 (NPA=2, PA=3), i.e. exactly the composition 14 is documented for. Please keep 14 refused for now: drop the ,14 (so it stops at CASE DEFAULT as on develop), or give it its own CASE(14) with a message saying He5 cannot be defined. The dd3 commit 1cae5566 can stay; its 14 branch is then unreachable. Note for the lead, kept separate from the mechanical fixes: that commit also moves the DD3 product for model_pnf=2/3/4 from He4 to He3, which is the species the header documents and which the domain reviewer endorsed, but it is a result-changing physics choice of the same class as the Duane mapping; it is its own commit so it can be dropped if the lead prefers. Which species set 14 is meant to have (the header says nsmax=4, trinit.f90:490 says 6, the check needs 7) and whether model_pnf=4 — which has the same He5 hole today — should be refused too, goes to the lead with the other items you listed.
Found on the way, pre-existing, filed as #271 and #272 rather than asked of this PR: the natural cubic spline of the linear svnf_* values against log10(T) returns negative reactivities for D-He3 (2–4.5 keV) and T-He3, and a D-T value 5× too high at 1.5 keV and 11× too low at 2.5 keV (I reproduced this with lib/libspl1d.f90 and the tables; trm/libsigma.f90 splines log10(σv) instead); and the two-entry reactions (DD1/DD2, DHe31/32, THe3x) each subtract SNF from both reactant slots, so D is depleted once per entry rather than once per reaction. Both change model_pnf>0 results again once fixed; your 1e-10 oracle will be useful there.
LOW, fold in if you like: the sigmav_nf header comment could state the return unit (m³/s), and trmenu.f90:157 prints sigma= with no unit, now in m³/s. A CHANGELOG.md Fixed entry covering this PR and #270 (results of model_pnf>0 runs change) would be welcome; trx is outside the file's stated Phase L scope, so your call.
After the one change: approve from my side; merge needs the lead's confirmation as well, per the plan on #236.
The presence check's CASE(4,14) let model_pnf=14 run whenever D, T, He4, H and He3 are present. NS_He5 is no species found in the run: pl/plinit.f90 sets it to the literal 7, and tr_prep_ns neither resets nor matches it, and a He5 species cannot be defined at all: pl_prep_ns, which tr_prep calls through pl_prep, stops on an NPA=2, PA=5 species. So for 14 the presence check passed on NS_He5 = 7, nsp_idnf(id_nf_the35) was 7, and tr_pnf wrote SNF_NSNNFNR(7,...) and PNF_NSNNFNR(7,...), past the (NSMAX,NNFMAX,NRMAX) arrays for NSMAX < 7. He3 can be defined through the plparm file that trmain reads (&PL takes NPA and PA): with H and He3 there and NSMAX=6, the branch stopped at trpnf.f90:88, "Index '7' of dimension 1 of array 'snf_nsnnfnr' above upper bound of 6". 14 now has its own CASE: it stops with "XX Error: libnf: model_pnf=14 is not available: no He5 species can be defined", where develop stopped with "undefined model_pnf". CASE(4) is as on develop; model_pnf=4 has the same NS_He5 hole there, left to the module lead with the species set 14 is meant to have. Asked in the review of k-yoshimi#269. Item 3 of k-yoshimi#235. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… it (k-yoshimi#236) Since k-yoshimi#236's fix sigmav_nf returns m^3/s. Its PUBLIC line and its header comment now say so, and the menu's B command, which printed "sigma=" with no unit, prints "sigmav [m^3/s]=". No value changes. Asked as a LOW in the review of k-yoshimi#269. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-yoshimi#270) One Fixed entry for this pull request and k-yoshimi#270, as suggested in the review of k-yoshimi#269. Results of model_pnf>0 runs change; in NBI runs the printed beam collisional powers PBCLE to PBCLA change by 1e6 (now MW). PNB_TOT and PRF_TOT are not fixed by this, since the arrays they integrate are never filled in trx (k-yoshimi#238); they read 0 with model_nnb=1, PNBIN=10 and with PECIN=5 on k-yoshimi#238's deck with fusion off, develop against k-yoshimi#270. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you. The change you asked for is done, and so are both LOWs: three new commits on top of
You were right about 14, and my description and my comment on #236 were wrong: He3 can be defined, through the Runs at the new head, The lead's items stay as you listed them: the species set 14 is meant to have, |
k-yoshimi
left a comment
There was a problem hiding this comment.
Second pass over the delta 5c7b87d4..8daf0d6c (Codex + in-house domain and verifier lenses + docs/workflow review), with trx/tr2 rebuilt from this head the same way as before (gfortran 15.2, bounds and FPE checks, graphics stubbed).
The code change is accepted. The species check's SELECT CASE is well formed ((1,12), (2,3), (4), (14), DEFAULT), CASE(4) is as on develop, and the comment in CASE(14) is right on every point we checked (pl/plinit.f90:122, trx/trprep.f90:114-164, pl/plprep.f90). The unit annotations match what sigmav_nf returns (one *1.D-6 at trx/libnf.f90:443, tables in cm^3/s). Nothing parses the old sigma= label.
Reproduction. The 10 keV deck, the 1 keV deck and the fusion-off deck print the same output as at 5c7b87d4 apart from the CPU and elapsed-time lines. With your plparm (H and He3, NSMAX=6) and model_pnf=14 the run stops with XX Error: libnf: model_pnf=14 is not available: no He5 species can be defined, as you describe. With the same plparm and model_pnf=1 the run stops at trexec.f90:533 (Index '0' of dimension 2 of array 'b', NEA(NS,2)=0 for the species without an equation) on develop's tr2 as well, so that is pre-existing; It is now #275, so the lead's item has a number.
One thing to change, text only — CHANGELOG.md. All three reviewers raised it independently and the verifier confirmed it against the code: the entry is under Fixed on this branch, but two of its sentences describe trx/trrslt.f90, which this branch does not touch. In this checkout the ten TRGLOB integrals (trx/trrslt.f90:167-328) still have no /1.D6, and PBCLE..PBCLA (PNBCL_NS, printed at :930) are still in W. If #269 merges before #270, or #270 is held, develop's changelog says fixes exist that do not. Please:
- move the sentence "Ten power integrals of
TRGLOBstayed in W …" and the sentence "In NBI runs the printed beam collisional powers (PBCLEtoPBCLA) are now in MW;PNB_TOTandPRF_TOT…" into an entry on #270 (a docs-only commit there; we will re-check it without a rebuild), and tag this entry(#269; …); - "never set
PNFIN_NSNNFNR": the only write on this branch is the zeroing attrx/trpnf.f90:70, soPNFIN_TOTis still always 0. "is now zeroed each call" says what the code does.
Merging #270 first (or together) would also make the text true, and if the maintainers prefer that we can take it, but the split is cleaner whatever the lead decides.
LOW, same commit if you like.
- The parameter tables in
trx/libnf.f90:37-44andtrx/trinit.f90:490-497still listmodel_pnf=14as a model; one word there ("not available: no He5 species") saves a user a run. the35's productin theCASE(14)comment reads as a typo for "the THe35 product"; and "past the arrays when NSMAX < 7" is true of the(NSMAX,NNFMAX,NRMAX)arrays (SNF_/PNF_/PNFIN_/PNFCL_NSNNFNR), not ofRN/RT/PA/PZ, which are sizedNSTM/NSM.
Recorded, not requested. model_pnf=4 has the same NS_He5 hole (the guard at :202 can never fire on NS_He5=7); that, the species set 14 is meant to have, and the dd3 commit stay on the lead's list as before. PNFCL_NSNNFNR is likewise only zeroed, so PFCLE..PFCLA are always 0 (same class as #238). The refusal is a STOP like its neighbours; trx/libnf.f90 is linked into tr2 only, not into any shared library, so #142 does not apply.
Verdict: request changes for the changelog text only; approve follows the push, no rebuild needed on our side for a docs commit.
…vailable (k-yoshimi#269) As asked in the second review of k-yoshimi#269. The CHANGELOG entry covered k-yoshimi#270 too: its sentences on the ten TRGLOB integrals of trx/trrslt.f90 and on the NBI powers describe code this branch does not change, so they move to an entry on k-yoshimi#270, and this one is tagged (k-yoshimi#269; ...). "never set PNFIN_NSNNFNR" is replaced by what the code does: tr_pnf zeroes it on each call and nothing else writes it, so its totals stay 0. Also from that review: the model tables of trx/libnf.f90 and trx/trinit.f90 mark model_pnf=14 as not available (no He5 species can be defined), and the CASE(14) comment names the THe35 product and the arrays it would overrun (tr_pnf's (NSMAX,NNFMAX,NRMAX) arrays). No code changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sentences on the ten TRGLOB integrals and on the NBI powers were in k-yoshimi#269's CHANGELOG entry, although this pull request makes that change; the review of k-yoshimi#269 asked to move them here, so that develop's changelog is true whichever of the two merges first. The entry sits after the second [Unreleased] Fixed entry, a boundary no other open pull request inserts at. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Done in
|
k-yoshimi
left a comment
There was a problem hiding this comment.
b9ae2485 checked: the diff against 8daf0d6c touches CHANGELOG.md and comment lines only (no non-comment line of trx/libnf.f90 or trx/trinit.f90 changes), so the tr2 built from 8daf0d6c and its runs stand. The entry now describes this branch: every sentence in it is something trx/libnf.f90 or trx/trpnf.f90 does here, the PNFIN_NSNNFNR sentence says what the code does, and the two TRGLOB sentences are on #270 (d2bbfcca, approved there). The model tables mark 14, the CASE(14) comment names the THe35 product and the (NSMAX,NNFMAX,NRMAX) arrays. CI 9/9 on this head. git merge-tree here agrees with you: clean against develop, #270, #231 and #267; trx/libnf.f90 conflicts with #226, which is why #269 should merge before #226.
Verdict: approve. Merge together with #270 (either order now that each carries its own changelog entry), on the lead's confirmation per the plan on #236; the lead's items (species set of 14 and 4, NS_He5, the dd3 choice, #275) are unchanged.
The rate-path PR asked for in the triage on #236: one commit per defect, issue number in the subject, on
develop4b5463e4. The fixes changetrx/libnf.f90andtrx/trpnf.f90; of the three commits added after your review, one also touchestrx/trmenu.f90(a printed unit) and oneCHANGELOG.md.39dfc77cpm_localisREAL(rkind)(it truncated a mass of order 1e-27 kg to 0)26cd2f3eIMPLICIT NONEinlibnf_localandlibnf; compiles cleanly (#234-3 does not apply todevelop, as you said)c0dd2721sigmav_nf = sigmav_nf*1.D-6at the single computed exit31e65493PA,PZ,COULOGof the slowing-down loop takensp, not the stalensef975281tr_pnfzeroesPNF_NSNNFNRwith its siblings293899fetr_pnfzeroesPNFIN_NSNNFNRtoo (whether it should carry a value is left open)3953ef52CASE(1,12)/CASE(2,3)/CASE(4,14), andlibnb->libnfin the message (14 is refused again by428c0307)1cae5566nsp_idnf(id_nf_dd3): He4 for the reduced variants 12 and 14, He3 for 2, 3 and 4 (its own commit, so it can be dropped)5ab61000enn_idnf(id_nf_dd2), not dd3's5c7b87d4VF = SQRT(2*eng_nnf/(PA(nsp)*AMP)):eng_nnfis already in joules (eng_idnf(id_nf_dt)=3.5D3*RKEV), and the*RKEVon this line applied it twice428c0307model_pnf=14gets its ownCASE(14)and stops with "no He5 species can be defined";CASE(4)is as ondevelopc4bca92bsigmav_nf's unit, m^3/s, in its two comments and in the menu'sBoutput8daf0d6cCHANGELOG.mdFixed entry (for this PR only sinceb9ae2485)b9ae2485d2bbfcca);model_pnf=14marked not available in the model tables oftrx/libnf.f90andtrx/trinit.f90; theCASE(14)comment rewordedmodel_pnf=14stays refused (428c0307, from your review). I had written in this description and on #236 that He3 cannot be defined from the menu, and concluded that 14 only reaches its presence check. That was wrong:trmainreadsplparm, whose&PLtakesNPAandPA. With H and He3 defined there (NSMAX=6),CASE(4,14)let 14 through onNS_He5 = 7, andtr_pnfstopped attrpnf.f90:88with "Index '7' of dimension 1 of array 'snf_nsnnfnr' above upper bound of 6" (reproduced here). 14 now has its ownCASE(14)and stops with "XX Error: libnf: model_pnf=14 is not available: no He5 species can be defined".CASE(4)is as ondevelop: its same He5 hole goes to the lead, with the species set 14 is meant to have and its remaps, which do not agree with each other (the32treats it as reduced;dd2,dhe32,the35,the36as the full variants).The dd3 remap. The header gives 12 and 14 the same DD3 line,
D + D -> He3 + n ! He4 + n, so both collapse the He3 product onto He4. Ondevelopthe remap gives He3 to 12 and He4 to every other variant;1cae5566gives He4 to 12 and 14 and He3 to 2, 3 and 4. So 12 changes from He3 to He4 and 2, 3, 4 from He4 to He3: for those three a choice that changes results, as you note, and the reason the commit stands alone. With 14 refused, its branch there is not reached.5c7b87d4was in no report; it is now #268. It is the fifth correction on our reference branch, and it sits on the same line as #235-1. Without itVFis 0.16 m/s instead of 1.3e7 m/s (a factorsqrt(RKEV)), soVF/VCRis about 4e-8 to 1.3e-7 on this deck instead of about 3 to 10. There1-HY(VF/VCR)inTAUFshould be of order 1e-22, but in double precision it is round-off of order 0.01 to 0.1 (and -0.69 at 1e-8), soTAUFis meaningless and can be negative. The alpha tail energyWTAILTof the intermediate rows below therefore means nothing; with the commit it is 4.27e-2 MJ. It is a commit of its own, so that it can be dropped if you prefer.One effect on #226. That branch still declares
PUBLIC sigmav_nfb_int(trx/libnf.f90:117) with nothing behind it. Under26cd2f3e's module-levelIMPLICIT NONEthe line no longer compiles. Git shows no conflict there and CI does not buildtrx, so nothing would flag it; I will drop the line when #226 mergesdevelop.Left out, as asked: #234-1 (the Duane columns), #238's secondary items, and the
STOP->ierrconversion (#142).How it was built and run
develop's CI does not buildtrx, so this is how it was run here: macOS arm64, gfortran 15 (MacPorts), themake.headerflags with run-time checks (-fbounds-check -fcheck=all -ffpe-trap=invalid,zero,overflow), GSAF 4.16 and X11 for the graphics thattr2links, andmtxpon MUMPS with MPICH;make -C trx;trx/tr2 < deckin an empty directory. The deck is #238's 10 keV D-T case (MODELG=2, e/D/T/He4,model_pnf=1), withw 1 xadded beforeqso thatTRPRNTtype 1 prints the global results. The same deck was also run withmodel_pnf=0,12and14, and a 1 keV variant of it. The decks draw nothing, so their GSAF files are empty and are not compared. The variants that need He3 (2, 3, 4) need it defined in aplparmfile (&TRtakes noNPA). With H and He3 there andNSMAX=6,model_pnf0, 1, 2, 3 and 12 all stop in the first step attrexec.f90:533, "Index '0' of dimension 2 of array 'b' below lower bound of 1", ondevelopand on this branch alike, so no run with He3 completes here (2 and 3 now pass their check and dd3 gives them He3, but there is no result for them); now #275.model_pnf=14was run both ways: on this deck, and with thatplparm(below).The 10 keV deck
PROFN2is per species intrx, so all four values are written out.What each commit does to the runs
trxrebuilt from clean atdevelopand at each commit (WPTandWTAILTin MJ; where a commit was later rewritten in its message orCHANGELOG.mdonly, the runs are those of the sametrxsources):model_pnf=1model_pnf=12model_pnf=14developnr=31(reported time 0.040 s; eight diagnostics,XX TRXTOA3andXX TRXTOA4)trpnf.f90:86: "Index '0' of dimension 1 of array 'snf_nsnnfnr' below lower bound of 1" (the dd3 product isNS_He3, which is 0)XX Error libnb: undefined model_pnf,STOP39dfc77c,26cd2f3ec0dd2721(#236)WPT28.71,WTAILT8.28e-231e65493(#235-1)WPT31.07,WTAILT2.19 (the fusion power still accumulates)ef975281(#235-2)WPT28.62,WTAILT-3.19e-3293899fe(#229-1)3953ef52(#235-3)XX Error: libnf: NS_H=0(the check is reached; the deck has no H)1cae5566(dd3)WPT28.70; dd2 and dd3 give He4, dd1 T5ab61000(#229-4)5c7b87d4(VF)WPT28.65,WTAILT4.27e-2WPT28.65,WTAILT4.30e-2428c0307(14 refused)XX Error: libnf: model_pnf=14 is not available: no He5 species can be definedc4bca92b,8daf0d6c,b9ae2485(comments, theBprint andCHANGELOG.mdonly)model_pnf=14with H and He3 defined inplparm(NSMAX=6): ondevelopXX Error libnb: undefined model_pnf; at5c7b87d4the stop attrpnf.f90:88quoted above; from428c0307on the new message.The plparm file and the deck for it
plparm, in the run directory:The deck is the 10 keV deck above with these lines in place of its
NSMAXtomodel_pnflines:The
Bcommand now printssigmav [m^3/s]= 1.1000000000000000E-022for D-T at 10 keV.With
model_pnf=0every commit prints the same output asdevelopapart from the CPU and elapsed-time lines. On the 1 keV deckTAUE1goes from 3.16e-7 s ondevelopto 0.267 s atc0dd2721and 1.164 s fromef975281on. Two consecutive runs of each deck give the same output apart from those time lines.PINT,TAUE1andQFare still corrupted by #238 on this branch: on the 10 keV deckPINTis 1.109e5 where it should be about 0.54 MW, soPINTandTAUE1are off by about 2e5 andQFby 1e6. That is the separate PR. A secondRin one process endstrxwith "Attempt to DEALLOCATE unallocated 'gpnb'" (trx/trcomm.f90:996), ondevelopas well, so there is no in-process two-run check here; not touched in this PR. No CI test is added, since CI does not buildtrxandtr2needs the graphics library.🤖 Generated with Claude Code