Skip to content

Commit

Permalink
[PL/HHPrho] Using gas and liquid phase pressures
Browse files Browse the repository at this point in the history
The formulation of the process requires the ideal gas law (which is
available on for gas_phase_pressure) to be written as a function in the
MoMaS tests.
  • Loading branch information
joergbuchwald authored and endJunction committed Dec 2, 2023
1 parent a410d48 commit 47c849c
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void TwoPhaseFlowWithPrhoLocalAssembler<ShapeFunction, GlobalDim>::assemble(

MPL::VariableArray variables;

variables.phase_pressure = pl_int_pt;
variables.liquid_phase_pressure = pl_int_pt;
variables.temperature = temperature;
variables.molar_mass =
gas_phase.property(MPL::PropertyType::molar_mass)
Expand Down Expand Up @@ -145,7 +145,8 @@ void TwoPhaseFlowWithPrhoLocalAssembler<ShapeFunction, GlobalDim>::assemble(

double const rho_wet = rho_h2o + rho_h2_wet;
_saturation[ip] = Sw;
_pressure_nonwetting[ip] = pl_int_pt + pc;
variables.gas_phase_pressure = _pressure_nonwetting[ip] =
pl_int_pt + pc;

// Assemble M matrix
// nonwetting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,18 @@
<properties>
<property>
<name>density</name>
<type>IdealGasLaw</type>
<type>Function</type>
<value>
<expression>liquid_phase_pressure * 0.002 / 8.3144621 / temperature </expression>
</value>
<dvalue>
<variable_name>liquid_phase_pressure</variable_name>
<expression> 0.002 / 8.3144621 / temperature </expression>
</dvalue>
<dvalue>
<variable_name>temperature</variable_name>
<expression> -liquid_phase_pressure * 0.002 / 8.3144621 / temperature / temperature </expression>
</dvalue>
</property>
<property>
<name>molar_mass</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,18 @@
<properties>
<property>
<name>density</name>
<type>IdealGasLaw</type>
<type>Function</type>
<value>
<expression>liquid_phase_pressure * 0.002 / 8.3144621 / temperature </expression>
</value>
<dvalue>
<variable_name>liquid_phase_pressure</variable_name>
<expression> 0.002 / 8.3144621 / temperature </expression>
</dvalue>
<dvalue>
<variable_name>temperature</variable_name>
<expression> -liquid_phase_pressure * 0.002 / 8.3144621 / temperature / temperature </expression>
</dvalue>
</property>
<property>
<name>molar_mass</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,18 @@
<properties>
<property>
<name>density</name>
<type>IdealGasLaw</type>
<type>Function</type>
<value>
<expression>liquid_phase_pressure * 0.002 / 8.3144621 / temperature </expression>
</value>
<dvalue>
<variable_name>liquid_phase_pressure</variable_name>
<expression> 0.002 / 8.3144621 / temperature </expression>
</dvalue>
<dvalue>
<variable_name>temperature</variable_name>
<expression> -liquid_phase_pressure * 0.002 / 8.3144621 / temperature / temperature </expression>
</dvalue>
</property>
<property>
<name>molar_mass</name>
Expand Down

0 comments on commit 47c849c

Please sign in to comment.