ukaea / PROCESS

PROCESS is a systems code at UKAEA that calculates in a self-consistent manner the parameters of a fusion power plant with a specified performance, ensuring that its operating limits are not violated, and with the option to optimise to a given function of these parameters.
https://ukaea.github.io/PROCESS/
MIT License
36 stars 11 forks source link

Minor bug in plasma volume #880

Closed jonmaddock closed 7 months ago

jonmaddock commented 5 years ago

In GitLab by @mkovari on Jul 10, 2019, 13:37

Plasmod overwrites the plasma volume calculated by PROCESS.

In Plasmod the volume is calculated by numerical integration using subroutine INITEQUIL:

V = cumint1(dvdr * gradient1(rhoint))

which is later copied into mhd%vp:

mhd%Vp = V(nx)

and then into vol, overwriting its previous value:

vol = mhd%vp ! plasma volume (m^3)

(subroutine convert_Plasmod2PROCESS).
This results in two different values of the plasma volume, which never converge to a single value:

 PLASMOD:           Plasma volume     2448.5162990830318     
 Subroutine geomty: Plasma volume     2465.5702962059686     
 PLASMOD:           Plasma volume     2448.5163137893992     
 Subroutine geomty: Plasma volume     2465.5702962059686     
 PLASMOD:           Plasma volume     2448.5163133818191     
 Subroutine geomty: Plasma volume     2465.5702962059686     
 PLASMOD:           Plasma volume     2448.5163133810902     
 Subroutine geomty: Plasma volume     2465.5702962059686     
 PLASMOD:           Plasma volume     2448.5163133810611     
 =>    8  vmcon iterations. Normalised FoM =  0.7987  Residuals (sqsumsq) = 3.9E-06  Convergence param = 5.6E-07

 ************************************* PROCESS found a feasible solution **************************************

Anything calculated from the volume will also have two possible values. It is also just possible that this is interfering with convergence in some circumstances.

I suppose we should decide which is more accurate and remove the other calculation. The formula we keep should be

I propose to remove the line in Plasmod that overwrites the vol variable in PROCESS. Comments @efable @stuartmuldrew ?

Steps to reproduce

Any input file using Plasmod.
Uncomment the three write statements whose outputs are shown above.

Checklist

After fixing bug do the following

jonmaddock commented 5 years ago

In GitLab by @mkovari on Jul 11, 2019, 16:29

mentioned in commit 73781ee0521db7f046f6f99d0496c49e8077c5fd

jonmaddock commented 5 years ago

In GitLab by @jmorris-uk on Jul 12, 2019, 14:51

mentioned in commit d01b19c1085ee9f98083cd69c8ddc4e33e16f15e

jonmaddock commented 5 years ago

In GitLab by @jmorris-uk on Jul 12, 2019, 15:13

Done.

jonmaddock commented 5 years ago

In GitLab by @jmorris-uk on Jul 12, 2019, 15:13

closed

jonmaddock commented 4 years ago

In GitLab by @mkovari on Nov 20, 2019, 11:36

reopened

jonmaddock commented 4 years ago

In GitLab by @mkovari on Nov 20, 2019, 11:37

Sorry to be a ....
I notice that neither of the checklists have been completed.

jonmaddock commented 2 years ago

In GitLab by @wg7580 on Jul 20, 2022, 09:20

@jmorris-uk It looks as though this is okay to close? agree?

mkovari commented 7 months ago

Plasmod has now been removed so this issue is obsolete.