Senichi/time dependent speed up - #32
Conversation
…m with dtee, dtei and dtmo in dynamic mode
| write(hlp_frm,'(a,i3,a,i3,a,i3,a)') '(a1,6x,a4,5x,', | ||
| , nr_tmp*nrg_tmp,'(4x,a8,i2.2),', | ||
| , ns_tmp*nsp_tmp,'(4x,a8,a2),1x,', | ||
| , ns_tmp*nsp_tmp,'(4x,a8,a2),', |
There was a problem hiding this comment.
Can you show me an example of the file before and after this format change?
There was a problem hiding this comment.
I just want to better align the column headers with the data themselves. Please compare the original and new tracing files (slightly renamed to upload them to GitHub)
intshrt_new.trc.txt
There was a problem hiding this comment.
I agree that your alignment looks better if you list the numbers with two-digit exponents, but since having three digit exponents is a required feature, and that is what the original alignment was doing, you MUST revert this change and also the other change on line 367 where you wrongfully changed the format from e12.4 to e12.4e3.
There was a problem hiding this comment.
OK, my mistake with the exponent formatting is now clear, thank you. However, I'm confused with what is wrong with 'e12.4', or with 'e12.4e3', and which one is correct. May I simply copy the last several lines from what is on 'feature/wg_release' branch, like following?
c Create a format string for the column headers
if (nfl_tmp.gt.0) then
write(hlp_frm,'(a,i3,a,i3,a,i3,a)') '(a1,6x,a4,4x,',
, nr_tmpnrg_tmp,'(4x,a8,i2.2),',
, ns_tmpnsp_tmp,'(4x,a8,a2),1x,',
, na_tmpnrg_tmpnsp_tmp,'(1x,a8,i2.2,''_'',a2))'
#ifdef DBG
c print *,'%%%b2wrsrt: nsp_tmp,nfl_tmp= ',nsp_tmp,nfl_tmp
print *,'hlp_frm:'
print *,trim(hlp_frm)
#endif
endif
if (nfl_tmp.gt.0) then
write(lun,hlp_frm) '#','time',
, ((hlp_hr(j),i,i=1,nrg_tmp),j=1,nr_tmp),
, ((hlp_hs(j),species_list(i),i=1,nsp_tmp),j=1,ns_tmp),
, (((hlp_ha(k),j,species_list(i),j=1,nrg_tmp),
, i=1,nsp_tmp),k=1,na_tmp)
end if
end if
if (nfl_tmp.gt.0) then
write(hlp_frm,'(a,i3,a)') '(1p,e16.7,',
+ nr_tmp*nrg_tmp + ns_tmp*nsp_tmp + na_tmp*nrg_tmp*nsp_tmp,
+ '(2x,e12.4e3))'
end if
#ifdef DBG
print *,'hlp_frm:' !###
print *,trim(hlp_frm) !###
#endif
return
c=======================================================================
There was a problem hiding this comment.
The REQUIREMENT is very simple. The output of reals must have the format ending with E+123. Your proposal of using a string to create the format looks fine.
…kov/B2.5 into senichi/time_dependent_speed-up
|
Regarding the time-dependent mode and 'b2mndt_style.eq.2'. Generally, they are not the same, because only with 'b2mndt_style.eq.2' the essential terms like te * d ne /dt are included into equations. So, if one (Lisa K) wants to solve balance equations with these terms, he(she) have to activate 'b2mndt_style.eq.2'. However, even with these terms activated, Lisa K may want to use other features of the code, like time multipliers (e.g. DTEE to speed-up the evolution of electron internal energy) or solve total energy balance equations (to avoid numerical instabilities causes by electron-ion heat exchange term under high collisionality conditions) . Lisa K believes that settings like these should be available, therefore she suggested replacing code termination with warning messages saying that the time-dependent mode is not activated correctly. |
|
I understand the rationale. Thank you. I therefore expect a parallel PR on the main SOLPS-ITER repository that will modify the explanations in the Manual about the dynamic mode on these restrictions and that can be lifted and under what circumstances. |
|
@senichenkov I'm still waiting on a parallel PR at the SOLPS-ITER level to clarify the text in the Manual to explain this new option for running the code. |
|
I'm sorry for delay. I'm busy with many other activities, and I have to install 3.0.10 branch somewhere which I do not plan to use for computation - it seems I fully switched to WG. |
|
Since this is a PR for the WG code, the change is to be made in the WG manual, so no need for a 3.0.10-based PR. |
|
I modified the b2input.xml, but you expect corresponding updates to solps.tex. Ok, that's easier. Sorry for misunderstanding |
These changes were suggested by Lisa K 'with her outstanding great wisdom'. Briefly speaking, sometimes it is necessary to keep terms like Ted(ne)/d(dt) (which are available only with 'b2mndt_style=2', but simultaneously do not care about true time-dependent mode - e.g. apply the speed-up by increasing dtee, dtei, dtmo in some regions. In such case it is worth to replace error messages with warning ones.
Additionally, for such cases a treatment of terms like Ted(ne)/d(dt) is changed to speed-up the internal energy (or full momentum) even if dtee*rxf .ne. 1.0. Actually, a 'third' option from my User Forum presentation is implemented.