52 " ConvPresTempEdenIoniz1 entered, will call ConvIoniz to initialize\n");
67 " ConvPresTempEdenIoniz1 ConvIoniz found following converged: Pres:%c, Temp:%c, Eden:%c, Ion:%c, Pops:%c\n",
79 "\n ConvPresTempEdenIoniz1 entering main pressure loop.\n");
89 double TemperatureInitial =
phycon.
te;
104 bool lgPresOscil =
false;
105 bool lgStable =
true;
107 long nloop_pres_oscil = 0;
109 double hden_chng = 0.;
111 double dP_chng_factor = 1.;
114 const int LOOPMAX = 100;
116 long LoopMax = LOOPMAX;
122 LoopMax = 10*LOOPMAX;
147 bool lgAbortPressure;
148 PressureChange(dP_chng_factor, presmode, st, lgAbortPressure, lgStable);
149 if( lgAbortPressure )
155 double hden_chng_old = hden_chng;
162 enum{DEBUG_LOC=
false};
175 if( ( ( hden_chng*hden_chng_old < 0. ) ) && loop > 1 )
180 nloop_pres_oscil = loop;
182 dP_chng_factor =
MAX2( 0.125, dP_chng_factor * 0.5 );
199 " ConvPresTempEdenIoniz1 %ld l:%3li nH:%.4e ne:%.4e PCurnt:%.4e err:%6.3f%% dPf:%.2e Te:%.4e Osc:%c Stb:%c\n",
219 if( loop - nloop_pres_oscil > 4 )
224 if( loop == LoopMax && !lgPresOscil )
226 LoopMax =
MIN2( LOOPMAX, LoopMax*2 );
236 double logRatio = log(targetDensity/startingDensity);
237 long nstep = (long) ceil(fabs(logRatio)/pdelta);
241 double density_change_factor = exp(logRatio/nstep);
243 for (
long i=0; i<nstep; i++)
264 " DensityUpdate called, changing HDEN from %10.3e to %10.3e Set fill fac to %10.3e\n",
287 " ConvPresTempEdenIoniz1 %.2f l:%3li nH:%.4e ne:%.4e PCurnt:%.4e err:%6.3f%% Te:%.4e Osc:%c\n",
329 # if !defined(NDEBUG)
void RT_OTS_ChkSum(long int ipPnt)
vector< double > hist_pres_density
double MaxFractionalDensityStepPerIteration
double pressureZone(const PresMode &presmode)
vector< double > hist_pres_error
void PressureChange(double dP_chng_factor, const PresMode &presmode, solverState &st, bool &lgAbort, bool &lgStable)
bool lgFirstSweepThisZone
ConvergenceCounter register_(const string name)
void TempChange(double TempNew, bool lgForceUpdate)
int ConvTempEdenIoniz(void)
void PresTotCurrent(void)
void ScaleAllDensities(realnum factor)
vector< double > hist_pres_current
void ConvFail(const char chMode[], const char chDetail[])
realnum gas_phase[LIMELM]
bool lgPressureInitialSpecified
#define DEBUG_ENTRY(funcname)
realnum scalingDensity(void)
int ConvPresTempEdenIoniz(void)
int fprintf(const Output &stream, const char *format,...)