58 const std::string& paramGroup =
"")
63 static Scalar gridYMax = getParamFromGroup<GlobalPosition>(paramGroup,
"Grid.UpperRight")[1];
64 static Scalar nCellsY = getParamFromGroup<GlobalPosition>(paramGroup,
"Grid.Cells")[1];
67 const auto lengthBox = gridYMax/nCellsY;
69 currentDensity *= 2.0/lengthBox;
71 currentDensity *= 1.0/lengthBox;
73 static Scalar transportNumberH2O = getParam<Scalar>(
"ElectroChemistry.TransportNumberH20");
74 static Scalar thermoneutralVoltage = getParam<Scalar>(
"ElectroChemistry.ThermoneutralVoltage");
75 static Scalar cellVoltage = getParam<Scalar>(
"ElectroChemistry.CellVoltage");
78 values[contiH2OEqIdx] = currentDensity/(2*
Constant::F);
79 values[contiH2OEqIdx] += currentDensity/
Constant::F*transportNumberH2O;
80 values[contiO2EqIdx] = -currentDensity/(4*
Constant::F);
81 values[energyEqIdx] = (thermoneutralVoltage - cellVoltage)*currentDensity;