Commit 914e0817 authored by Ronan Trépos's avatar Ronan Trépos
Browse files

parameters update:

- Hini (resp da, Hcc, Hpf) can be given and provide both
Hini_C1 and Hini_C2
- Hini represents the ration [0, 1] between Hpf and Hcc
parent a977dfbd
<?xml version='1.0' encoding='UTF-8'?>
<vle_project version="1.0" author="Pierre Casadebaig" date="2014-Dec-17 17:32:19">
<vle_project date="2014-Dec-17 17:32:19" author="Pierre Casadebaig" version="1.0">
<structures>
<model type="coupled" y="0" name="sunflo" width="1610" x="0" height="1051">
<model x="0" name="sunflo" width="1610" y="0" type="coupled" height="1051">
<submodels>
<model type="atomic" y="295" dynamics="ConduiteCulture" name="itk" width="100" x="82" conditions="itk" height="150">
<model x="82" dynamics="ConduiteCulture" name="itk" width="100" conditions="itk" y="295" type="atomic" height="150">
<out>
<port name="ActionFerti"/>
<port name="ActionIrrig"/>
......@@ -15,7 +15,7 @@
<port name="zSemis"/>
</out>
</model>
<model type="coupled" y="64" name="sunflo_bio" width="100" x="286" height="255">
<model x="286" name="sunflo_bio" width="100" y="64" type="coupled" height="255">
<in>
<port name="ActionFerti"/>
<port name="ActionIrrig"/>
......@@ -49,7 +49,7 @@
<port name="Nabs"/>
</out>
<submodels>
<model type="atomic" observables="croissance_plante" y="209" dynamics="croissance_plante" name="croissance_plante" width="100" x="777" conditions="CONFIG_Plante,CONFIG_Variete,croissance_plante,simulation_engine,EXPERT_Plante" height="225">
<model x="777" dynamics="croissance_plante" name="croissance_plante" observables="croissance_plante" width="100" conditions="CONFIG_Plante,CONFIG_Variete,croissance_plante,simulation_engine,EXPERT_Plante" y="209" type="atomic" height="225">
<in>
<port name="ActionSemis"/>
<port name="ChgtPhasePhenoPlante"/>
......@@ -75,7 +75,7 @@
<port name="Eb"/>
</out>
</model>
<model type="atomic" observables="diagnostic" y="124" dynamics="diagnostic" name="diagnostic" width="100" x="633" conditions="CONFIG_Plante,CONFIG_SimuInit,CONFIG_Variete,diagnostic,EXPERT_Plante,EXPERT_SimuInit" height="75">
<model x="633" dynamics="diagnostic" name="diagnostic" observables="diagnostic" width="100" conditions="CONFIG_Plante,CONFIG_SimuInit,CONFIG_Variete,diagnostic,EXPERT_Plante,EXPERT_SimuInit" y="124" type="atomic" height="75">
<in>
<port name="ChgtPhasePhenoPlante"/>
<port name="ETRETM"/>
......@@ -87,7 +87,7 @@
<port name="ISH3"/>
</out>
</model>
<model type="atomic" observables="phenologie" y="22" dynamics="Phenologie" name="phenologie" width="100" x="252" conditions="CONFIG_SimuInit,CONFIG_Variete,phenologie,EXPERT_Plante,CONFIG_Plante,EXPERT_SimuInit" height="105">
<model x="252" dynamics="Phenologie" name="phenologie" observables="phenologie" width="100" conditions="CONFIG_SimuInit,CONFIG_Variete,phenologie,EXPERT_Plante,CONFIG_Plante,EXPERT_SimuInit" y="22" type="atomic" height="105">
<in>
<port name="ActionRecolte"/>
<port name="ActionSemis"/>
......@@ -102,7 +102,7 @@
<port name="TT_F1"/>
</out>
</model>
<model type="atomic" observables="temperature_efficace" y="248" dynamics="TemperatureEfficace" name="temperature_efficace" width="100" x="115" conditions="temperature_efficace,CONFIG_Plante,EXPERT_Plante" height="45">
<model x="115" dynamics="TemperatureEfficace" name="temperature_efficace" observables="temperature_efficace" width="100" conditions="temperature_efficace,CONFIG_Plante,EXPERT_Plante" y="248" type="atomic" height="45">
<in>
<port name="Tmoy"/>
</in>
......@@ -110,7 +110,7 @@
<port name="Teff"/>
</out>
</model>
<model type="coupled" y="597" name="performances" width="100" x="828" height="195">
<model x="828" name="performances" width="100" y="597" type="coupled" height="195">
<in>
<port name="ChgtPhasePhenoPlante"/>
<port name="ETRETM"/>
......@@ -135,7 +135,7 @@
<port name="TH"/>
</out>
<submodels>
<model type="atomic" observables="elaboration_qualite" y="245" dynamics="elaboration_qualite" name="elaboration_qualite" width="100" x="360" conditions="CONFIG_Variete,elaboration_qualite,itk" height="165">
<model x="360" dynamics="elaboration_qualite" name="elaboration_qualite" observables="elaboration_qualite" width="100" conditions="CONFIG_Variete,elaboration_qualite,itk" y="245" type="atomic" height="165">
<in>
<port name="ChgtPhasePhenoPlante"/>
<port name="JSM"/>
......@@ -152,7 +152,7 @@
<port name="TH"/>
</out>
</model>
<model type="atomic" observables="elaboration_rendement" y="33" dynamics="elaboration_rendement" name="elaboration_rendement" width="100" x="320" conditions="CONFIG_SimuInit,CONFIG_Variete,EXPERT_Plante,EXPERT_SimuInit,elaboration_rendement" height="135">
<model x="320" dynamics="elaboration_rendement" name="elaboration_rendement" observables="elaboration_rendement" width="100" conditions="CONFIG_SimuInit,CONFIG_Variete,EXPERT_Plante,EXPERT_SimuInit,elaboration_rendement" y="33" type="atomic" height="135">
<in>
<port name="ChgtPhasePhenoPlante"/>
<port name="ETRETM"/>
......@@ -242,7 +242,7 @@
</connection>
</connections>
</model>
<model type="coupled" y="577" name="contraintes" width="100" x="372" height="330">
<model x="372" name="contraintes" width="100" y="577" type="coupled" height="330">
<in>
<port name="ActionFerti"/>
<port name="ActionIrrig"/>
......@@ -285,7 +285,7 @@
<port name="vNabs"/>
</out>
<submodels>
<model type="atomic" observables="contrainte_azote" y="39" dynamics="croissance_azote" name="contrainte_azote" width="100" x="937" conditions="CONFIG_Plante,CONFIG_SimuInit,CONFIG_Sol,EXPERT_Plante,EXPERT_SimuInit,contrainte_azote" height="480">
<model x="937" dynamics="croissance_azote" name="contrainte_azote" observables="contrainte_azote" width="100" conditions="CONFIG_Plante,CONFIG_SimuInit,CONFIG_Sol,EXPERT_Plante,EXPERT_SimuInit,contrainte_azote" y="39" type="atomic" height="480">
<in>
<port name="ActionFerti"/>
<port name="ActionIrrig"/>
......@@ -327,7 +327,7 @@
<port name="vNabs"/>
</out>
</model>
<model type="atomic" observables="contrainte_eau" y="352" dynamics="contrainte_eau" name="contrainte_eau" width="100" x="478" conditions="CONFIG_Plante,CONFIG_SimuInit,CONFIG_Sol,CONFIG_Variete,contrainte_eau,EXPERT_Plante,EXPERT_SimuInit" height="330">
<model x="478" dynamics="contrainte_eau" name="contrainte_eau" observables="contrainte_eau" width="100" conditions="CONFIG_Plante,CONFIG_SimuInit,CONFIG_Sol,CONFIG_Variete,contrainte_eau,EXPERT_Plante,EXPERT_SimuInit" y="352" type="atomic" height="330">
<in>
<port name="ActionIrrig"/>
<port name="ActionSemis"/>
......@@ -364,7 +364,7 @@
<port name="FTSW"/>
</out>
</model>
<model type="atomic" observables="contrainte_lumiere" y="61" dynamics="contrainte_lumiere" name="contrainte_lumiere" width="100" x="335" conditions="contrainte_lumiere" height="135">
<model x="335" dynamics="contrainte_lumiere" name="contrainte_lumiere" observables="contrainte_lumiere" width="100" conditions="contrainte_lumiere" y="61" type="atomic" height="135">
<in>
<port name="ActionSemis"/>
<port name="Ei"/>
......@@ -379,7 +379,7 @@
<port name="iPAR"/>
</out>
</model>
<model type="atomic" observables="contrainte_temperature" y="370" dynamics="contrainte_temperature" name="contrainte_temperature" width="100" x="282" conditions="CONFIG_Plante,contrainte_temperature,EXPERT_Plante" height="60">
<model x="282" dynamics="contrainte_temperature" name="contrainte_temperature" observables="contrainte_temperature" width="100" conditions="CONFIG_Plante,contrainte_temperature,EXPERT_Plante" y="370" type="atomic" height="60">
<in>
<port name="PhasePhenoPlante"/>
<port name="Tmoy"/>
......@@ -877,7 +877,7 @@
</connection>
</connections>
</model>
<model type="coupled" y="43" name="climat" width="100" x="19" height="120">
<model x="19" name="climat" width="100" y="43" type="coupled" height="120">
<out>
<port name="ETPP"/>
<port name="Pluie"/>
......@@ -887,7 +887,7 @@
<port name="Tx"/>
</out>
<submodels>
<model type="atomic" y="187" dynamics="GenericMean" name="GenericMean" width="100" x="284" height="60">
<model x="284" dynamics="GenericMean" name="GenericMean" width="100" y="187" type="atomic" height="60">
<in>
<port name="Tmax"/>
<port name="Tmin"/>
......@@ -896,7 +896,7 @@
<port name="Mean"/>
</out>
</model>
<model type="atomic" y="38" dynamics="MeteoReader" name="lecture_climat" width="100" x="62" conditions="simulation_engine,sunflo_climat" height="105">
<model x="62" dynamics="MeteoReader" name="lecture_climat" width="100" conditions="simulation_engine,sunflo_climat" y="38" type="atomic" height="105">
<out>
<port name="ETP"/>
<port name="Pluie"/>
......@@ -1013,7 +1013,7 @@
<dynamic name="elaboration_qualite" library="ElaborationQualite" package="sunflo"/>
<dynamic name="elaboration_rendement" library="ElaborationRendement" package="sunflo"/>
</dynamics>
<experiment name="sunflo_simple_new" duration="181" combination="linear" begin="2453834">
<experiment begin="2453834" name="sunflo_simple_new" combination="linear" duration="181">
<conditions>
<condition name="CONFIG_Plante">
<port name="AA_a">
......@@ -1091,10 +1091,10 @@
</condition>
<condition name="CONFIG_SimuInit">
<port name="Hini_C1">
<double>19.699999999999999</double>
<double>1</double>
</port>
<port name="Hini_C2">
<double>19.699999999999999</double>
<double>1</double>
</port>
<port name="NomSimuInit">
<string>indetermine</string>
......@@ -1550,7 +1550,7 @@
</conditions>
<views>
<outputs>
<output plugin="storage" name="viewDbg" format="local" location="" package="vle.output">
<output location="" name="viewDbg" package="vle.output" plugin="storage" format="local">
<map>
<key name="inc_columns">
<integer>10</integer>
......@@ -1570,7 +1570,7 @@
</map>
</output>
<output plugin="storage" name="viewStatic" format="local" location="" package="vle.output">
<output location="" name="viewStatic" package="vle.output" plugin="storage" format="local">
<map>
<key name="inc_columns">
<integer>10</integer>
......@@ -1752,9 +1752,9 @@
</observable>
</observables>
<view output="viewDbg" type="timed" name="viewDbg" timestep="1.000000000000000"/>
<view timestep="1.000000000000000" name="viewDbg" output="viewDbg" type="timed"/>
<view output="viewStatic" type="finish" name="viewStatic"/>
<view name="viewStatic" output="viewStatic" type="finish"/>
</views>
</experiment>
......
......@@ -33,7 +33,6 @@ public :
ParametresPlante pp;
ParametresSol ps;
ParametresSimuInit psi;
// provenant de phenologie
/*Sync*/ Var PhasePhenoPlante;
......@@ -172,7 +171,6 @@ public :
pp.initialiser(events);
ps.initialiser(events);
psi.initialiser(events);
Teff.init(this, "Teff", events);
PhasePhenoPlante.init(this, "PhasePhenoPlante", events);
......@@ -585,7 +583,7 @@ public :
} else if ( zRac() > 300.0 ){
double p1_tmp = CN1() * 100.0 * 31.0;
vAA1_tmp = ( (0.0018 * p1_tmp) / (50.0 + p1_tmp) )
+ ( (0.05 * p1_tmp) / (25000.0 + p1_tmp) ) * 24.0 * pp.AA_a * Ea() * psi.zC1;
+ ( (0.05 * p1_tmp) / (25000.0 + p1_tmp) ) * 24.0 * pp.AA_a * Ea() * ps.zC1;
double p2_tmp = CN2() * 100.0 * 31.0;
vAA2_tmp = ( (0.0018 * p2_tmp) / (50.0 + p2_tmp) )
+ ( (0.05 * p2_tmp) / (25000.0 + p2_tmp)) * 24.0 * zC2() * pp.AA_a * Ea();
......
......@@ -33,7 +33,6 @@ public :
ParametresPlante pp;
ParametresVariete pv;
ParametresSol ps;
ParametresSimuInit psi;
/// Parametre interne \n
///# Réserve Utile (mm d'eau ) par mm de sol dans l'horizon de surface (C1)
......@@ -145,7 +144,6 @@ public :
pp.initialiser( events );
pv.initialiser( events );
ps.initialiser( events );
psi.initialiser( events );
RUmmC1 = ( ps.Hcc_C1 - ps.Hpf_C1 ) / 100.0 * ps.da_C1 * ( 1.0 - ps.TC );
RUmmC2 = ( ps.Hcc_C2 - ps.Hpf_C2 ) / 100.0 * ps.da_C2 * ( 1.0 - ps.TC );
......@@ -213,15 +211,15 @@ public :
if (first_compute) {
first_compute = false;
double Ei_valeurInitiale = 0.0;
C1 = ( psi.Hini_C1 - ps.Hpf_C1 ) / 100.0 * ps.da_C1 * psi.zC1 * ( 1.0 - ps.TC );
C1 = (ps.Hini_C1 * (ps.Hcc_C1 - ps.Hpf_C1)) / 100.0 * ps.da_C1 * ps.zC1 * ( 1.0 - ps.TC );
C2 = 0.01; //codeMMpourMemo Initial Value = 0.01
C3 = ( psi.Hini_C2 - ps.Hpf_C2 ) / 100.0 * ps.da_C2 * (zBilan - psi.zC1 ) * ( 1.0 - ps.TC );
C3 = (ps.Hini_C2 * (ps.Hcc_C2 - ps.Hpf_C2)) / 100.0 * ps.da_C2 * (zBilan - ps.zC1 ) * ( 1.0 - ps.TC );
zRac = 0.0; //codeMMpourMemo Initial Value = 0
vRac = 0.0;
zC2 = 1.0;
{
double zC3_tmp = 0.0;
zC3_tmp =zBilan - psi.zC1 - zC2();
zC3_tmp =zBilan - ps.zC1 - zC2();
if ( zC3_tmp < 1.0 ){
zC3_tmp = 1.0;
}
......@@ -230,8 +228,8 @@ public :
{
double D1_tmp = 0.0;
if ( C1() >= ( psi.zC1 * RUmmC1 ) ){
D1_tmp = C1() - ( psi.zC1 * RUmmC1 );
if ( C1() >= ( ps.zC1 * RUmmC1 ) ){
D1_tmp = C1() - ( ps.zC1 * RUmmC1 );
} else {
D1_tmp = 0.0;
}
......@@ -259,7 +257,7 @@ public :
{
double STOCKC1_tmp = 0.0;
STOCKC1_tmp = ( ( ps.Hpf_C1 / 100.0 ) * ps.da_C1 * psi.zC1 ) + C1();
STOCKC1_tmp = ( ( ps.Hpf_C1 / 100.0 ) * ps.da_C1 * ps.zC1 ) + C1();
if ( STOCKC1_tmp <= 0.0 ){
STOCKC1_tmp = 0.1;
}
......@@ -284,7 +282,7 @@ public :
}
{
double TEC1_tmp = 0.0;
TEC1_tmp = STOCKC1() / psi.zC1 ;
TEC1_tmp = STOCKC1() / ps.zC1 ;
TEC1 = TEC1_tmp;
}
......@@ -325,15 +323,15 @@ public :
vTRp = pp.Kc * ETP() * Ei_valeurInitiale;
{
double fRacC1_tmp = 0.0;
double div = psi.zC1 + zC2();
fRacC1_tmp = psi.zC1 / div;
double div = ps.zC1 + zC2();
fRacC1_tmp = ps.zC1 / div;
fRacC1 = fRacC1_tmp;
}
{
double vTRC1_tmp = 0.0;
if ( C1() <= 0.0 ){
vTRC1_tmp = 0.0;
} else if ( zRac() > psi.zC1 ){
} else if ( zRac() > ps.zC1 ){
vTRC1_tmp = fRacC1() * vTRp() * FHTR();
} else {
vTRC1_tmp = vTRp() * FHTR();
......@@ -342,7 +340,7 @@ public :
}
{
double vTRC2_tmp = 0.0;
if ( zRac() > psi.zC1 ){
if ( zRac() > ps.zC1 ){
vTRC2_tmp = ( 1.0 - fRacC1() ) * vTRp() * FHTR();
}
vTRC2 = vTRC2_tmp;
......@@ -437,14 +435,14 @@ public :
|| ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE ) ){
// traduit condition t < jsemis or t > jrecolte
zC2_tmp = 1.0;
} else if ( zRac() < psi.zC1 ){
} else if ( zRac() < ps.zC1 ){
zC2_tmp = 1.0;
} else if ( ( zRac() - psi.zC1 ) >zBilan ){
} else if ( ( zRac() - ps.zC1 ) >zBilan ){
zC2_tmp =zBilan - 1.0;
} else if ( zRac() >zBilan ){
zC2_tmp =zBilan - psi.zC1 - 1.0;
zC2_tmp =zBilan - ps.zC1 - 1.0;
} else {
zC2_tmp = zRac() - psi.zC1 ;
zC2_tmp = zRac() - ps.zC1 ;
}
zC2 = zC2_tmp;
}
......@@ -452,7 +450,7 @@ public :
{
double zC3_tmp = 0.0;
zC3_tmp =zBilan - psi.zC1 - zC2();
zC3_tmp =zBilan - ps.zC1 - zC2();
if ( zC3_tmp < 1.0 ){
zC3_tmp = 1.0;
}
......@@ -462,8 +460,8 @@ public :
{
double D1_tmp = 0.0;
if ( C1() >= ( psi.zC1 * RUmmC1 ) ){
D1_tmp = C1() - ( psi.zC1 * RUmmC1 );
if ( C1() >= ( ps.zC1 * RUmmC1 ) ){
D1_tmp = C1() - ( ps.zC1 * RUmmC1 );
} else {
D1_tmp = 0.0;
}
......@@ -494,7 +492,7 @@ public :
{
double STOCKC1_tmp = 0.0;
STOCKC1_tmp = ( ( ps.Hpf_C1 / 100.0 ) * ps.da_C1 * psi.zC1 ) + C1();
STOCKC1_tmp = ( ( ps.Hpf_C1 / 100.0 ) * ps.da_C1 * ps.zC1 ) + C1();
if ( STOCKC1_tmp <= 0.0 ){
STOCKC1_tmp = 0.1;
}
......@@ -524,7 +522,7 @@ public :
{
double TEC1_tmp = 0.0;
TEC1_tmp = STOCKC1() / psi.zC1 ;
TEC1_tmp = STOCKC1() / ps.zC1 ;
TEC1 = TEC1_tmp;
}
......@@ -610,7 +608,7 @@ public :
ATSW = ATSW_tmp;
}
TTSW = ( RUmmC1 * psi.zC1 ) + ( RUmmC2 * zC2() );
TTSW = ( RUmmC1 * ps.zC1 ) + ( RUmmC2 * zC2() );
// FTSW, EQ17 de la publi
{
......@@ -693,8 +691,8 @@ public :
{
double fRacC1_tmp = 0.0;
double div = psi.zC1 + zC2();
fRacC1_tmp = psi.zC1 / div;
double div = ps.zC1 + zC2();
fRacC1_tmp = ps.zC1 / div;
fRacC1 = fRacC1_tmp;
}
......@@ -704,7 +702,7 @@ public :
if ( C1() <= 0.0 ){
vTRC1_tmp = 0.0;
} else if ( zRac() > psi.zC1 ){
} else if ( zRac() > ps.zC1 ){
vTRC1_tmp = fRacC1() * vTRp() * FHTR();
} else {
vTRC1_tmp = vTRp() * FHTR();
......@@ -716,7 +714,7 @@ public :
{
double vTRC2_tmp = 0.0;
if ( zRac() > psi.zC1 ){
if ( zRac() > ps.zC1 ){
vTRC2_tmp = ( 1.0 - fRacC1() ) * vTRp() * FHTR();
}
vTRC2 = vTRC2_tmp;
......
......@@ -21,45 +21,21 @@ namespace sunflo {
struct ParametresSimuInit
{
/// # Profondeur de l’horizon de surface (mm)
//codeMMpourMemo define value: zC1 Unconditional Universal
//codeMMpourMemo zC1 = 300
double zC1;
/// # Jour de levee (si spécifié, on ne simule plus la phase semis-levée)
//codeMMpourMemo parameter: date_A2 0 0
// date_A2 est renomme dateLevee_casForcee
std::string dateLevee_casForcee ;
//codeMMpourMemo parameter: Hini_C1 19.7 0
double Hini_C1 ;
//codeMMpourMemo parameter: Hini_C2 19.7 0
double Hini_C2 ;
/// Seuil ETR/ETM pour calcul jours de stress
double SeuilETRETM ;
void initialiser( const vle::devs::InitEventList& events ){
if ( events.exist("zC1") ){
zC1 = events.getDouble("zC1");
} else {
throw vle::utils::ModellingError("[ParametersSimuInit] missing 'zC1'");
}
if ( events.exist("dateLevee_casForcee") ){
dateLevee_casForcee = events.getString("dateLevee_casForcee");
} else {
throw vle::utils::ModellingError("[ParametersSimuInit] missing 'dateLevee_casForcee'");
}
if ( events.exist("Hini_C1") ){
Hini_C1 = events.getDouble("Hini_C1");
} else {
throw vle::utils::ModellingError("[ParametersSimuInit] missing 'Hini_C1'");
}
if ( events.exist("Hini_C2") ){
Hini_C2 = events.getDouble("Hini_C2");
} else {
throw vle::utils::ModellingError("[ParametersSimuInit] missing 'Hini_C2'");
}
if ( events.exist("SeuilETRETM") ){
SeuilETRETM = events.getDouble("SeuilETRETM");
} else {
......
......@@ -47,6 +47,17 @@ struct ParametresSol
//codeMMpourMemo parameter: Hcc_C2 19.7 0
double Hcc_C2 ;
//codeMMpourMemo parameter: Hpf_C1 9.7 0
double Hpf_C1 ;
//codeMMpourMemo parameter: Hpf_C2 9.7 0
double Hpf_C2 ;
//ratio of water if 1 -> Hini = Hcc if 0 -> Hini = Hpf
double Hini_C1 ;
//codeMMpourMemo parameter: Hini_C2 19.7 0
double Hini_C2 ;
/// # Valeur de la fonction "humidité" pour la minéralisation au point de flétrissement [Vale2006]
//codeMMpourMemo parameter: Fpf 0.2 0
double Fpf ;
......@@ -55,16 +66,16 @@ struct ParametresSol
//codeMMpourMemo parameter: Vp 0.5 0
double Vp ;
//codeMMpourMemo parameter: Hpf_C1 9.7 0
double Hpf_C1 ;
//codeMMpourMemo parameter: Hpf_C2 9.7 0
double Hpf_C2 ;
/// # Taux de cailloux
//codeMMpourMemo parameter: TC 0 0
double TC ;
/// # Profondeur de l’horizon de surface (mm)
//codeMMpourMemo define value: zC1 Unconditional Universal
//codeMMpourMemo zC1 = 300
double zC1;
void initialiser( const vle::devs::InitEventList& events ){
if ( events.exist("profondeur") ){
......@@ -78,15 +89,14 @@ struct ParametresSol
} else {
throw vle::utils::ModellingError("[ParametersSol] missing 'profondeur'");
}
if ( events.exist("da_C1") ){
if (events.exist("da_C1") and events.exist("da_C2")) {
da_C1 = events.getDouble("da_C1");
} else {
throw vle::utils::ModellingError("[ParametersSol] missing 'da_C1'");
}
if ( events.exist("da_C2") ){
da_C2 = events.getDouble("da_C2");
} else if (events.exist("da")){
da_C1 = events.getDouble("da");
da_C2 = events.getDouble("da");
} else {
throw vle::utils::ModellingError("[ParametersSol] missing 'da_C2'");
throw vle::utils::ModellingError("[ParametersSol] missing 'da_*'");
}
if (events.exist("Hcc_C1") and events.exist("Hcc_C2")) {
Hcc_C1 = events.getDouble("Hcc_C1");
......@@ -97,6 +107,24 @@ struct ParametresSol
} else {
throw vle::utils::ModellingError("[ParametersSol] missing 'Hcc_*'");
}
if (events.exist("Hpf_C1") and events.exist("Hpf_C2")) {
Hpf_C1 = events.getDouble("Hpf_C1");
Hpf_C2 = events.getDouble("Hpf_C2");
} else if (events.exist("Hpf")){
Hpf_C1 = events.getDouble("Hpf");
Hpf_C2 = events.getDouble("Hpf");
} else {
throw vle::utils::ModellingError("[ParametersSol] missing 'Hpf_*'");
}
if (events.exist("Hini_C1") and events.exist("Hini_C2")) {
Hini_C1 = events.getDouble("Hini_C1");
Hini_C2 = events.getDouble("Hini_C2");
} else if (events.exist("Hini")){
Hini_C1 = events.getDouble("Hini");
Hini_C2 = events.getDouble("Hini");
} else {
throw vle::utils::ModellingError("[ParametersSol] missing 'Hini_*'");
}
if ( events.exist("Fpf") ){
Fpf = events.getDouble("Fpf");
} else {
......@@ -107,21 +135,17 @@ struct ParametresSol
} else {
throw vle::utils::ModellingError("[ParametersSol] missing 'Vp'");
}
if ( events.exist("Hpf_C1") ){
Hpf_C1 = events.getDouble("Hpf_C1");
} else {
throw vle::utils::ModellingError("[ParametersSol] missing 'Hpf_C1'");
}
if ( events.exist("Hpf_C2") ){
Hpf_C2 = events.getDouble("Hpf_C2");
} else {
throw vle::utils::ModellingError("[ParametersSol] missing 'Hpf_C2'");
}
if ( events.exist("TC") ){
TC = events.getDouble("TC");
} else {
throw vle::utils::ModellingError("[ParametersSol] missing 'TC'");
}
if ( events.exist("zC1") ){
zC1 = events.getDouble("zC1");
} else {
throw vle::utils::ModellingError("[ParametersSol] missing 'zC1'");
}
}
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment