Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integratedTests
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,13 @@ using namespace stringutilities;
namespace PVTProps
{

constexpr real64 minForDivision = 1e-10;

constexpr real64 T_K_f = 273.15;
constexpr real64 P_Pa_f = 1e+5;

constexpr real64 P_c = 73.773 * P_Pa_f;
constexpr real64 T_c = 304.1282;
//constexpr real64 rho_c = 467.6;

//constexpr real64 R = 188.9241;

constexpr real64 Rgas = 8.314467;

constexpr real64 V_c = Rgas*T_c/P_c;

constexpr real64 acoef[] =
Expand Down Expand Up @@ -335,7 +331,6 @@ void CO2SolubilityFunction::Partition( EvalVarArgs const & pressure, EvalVarArgs
solubility = m_CO2SolubilityTable->Value( P, T );

real64 const waterMW = m_componentMolarWeight[m_waterIndex];
// real64 CO2MW = m_componentMolarWeight[m_CO2Index];

solubility *= waterMW;

Expand All @@ -346,7 +341,14 @@ void CO2SolubilityFunction::Partition( EvalVarArgs const & pressure, EvalVarArgs

//Y = C/W = z/(1-z)

Y = compFraction[m_CO2Index] / (1.0 - compFraction[m_CO2Index]);
if( compFraction[m_CO2Index].m_var > 1.0 - minForDivision )
{
Y = compFraction[m_CO2Index] / minForDivision;
}
else
{
Y = compFraction[m_CO2Index] / (1.0 - compFraction[m_CO2Index]);
}

if( Y < X )
{
Expand All @@ -356,7 +358,9 @@ void CO2SolubilityFunction::Partition( EvalVarArgs const & pressure, EvalVarArgs
phaseFraction[m_phaseGasIndex] = 0.0;

for( localIndex c = 0; c < m_componentNames.size(); ++c )
{
phaseCompFraction[m_phaseLiquidIndex][c] = compFraction[c];
}

}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ BrooksCoreyRelativePermeabilityUpdate::
}
else
{
phaseRelPerm[ip] = (satScaled < 0.0) ? 0.0 : scale;
phaseRelPerm[ip] = (satScaled <= 0.0) ? 0.0 : scale;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@


========================= ============ ======== ======================================================================================================================================================================================================================================================================================================================
Name Type Default Description
========================= ============ ======== ======================================================================================================================================================================================================================================================================================================================
capPressureNames string_array {} Name of the capillary pressure constitutive model to use
cflFactor real64 0.5 Factor to apply to the `CFL condition <http://en.wikipedia.org/wiki/Courant-Friedrichs-Lewy_condition>`_ when calculating the maximum allowable time step. Values should be in the interval (0,1]
discretization string required Name of discretization object to use for this solver.
fluidNames string_array required Names of fluid constitutive models for each region.
initialDt real64 1e+99 Initial time-step value required by the solver to the event manager.
inputFluxEstimate real64 1 Initial estimate of the input flux used only for residual scaling. This should be essentially equivalent to the input flux * dt.
logLevel integer 0 Log level
meanPermCoeff real64 1 Coefficient to move between harmonic mean (1.0) and arithmetic mean (0.0) for the calculation of permeability between elements.
name string required A name is required for any non-unique nodes
relPermNames string_array required Name of the relative permeability constitutive model to use
solidNames string_array required Names of solid constitutive models for each region.
targetRegions string_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager.
temperature real64 required Temperature
useMass integer 0 Use mass formulation instead of molar
LinearSolverParameters node unique :ref:`XML_LinearSolverParameters`
NonlinearSolverParameters node unique :ref:`XML_NonlinearSolverParameters`
========================= ============ ======== ======================================================================================================================================================================================================================================================================================================================
============================= ============ ======== ======================================================================================================================================================================================================================================================================================================================
Name Type Default Description
============================= ============ ======== ======================================================================================================================================================================================================================================================================================================================
allowLocalCompDensityChopping integer 1 Flag indicating whether local (cell-wise) chopping of negative compositions is allowed
capPressureNames string_array {} Name of the capillary pressure constitutive model to use
cflFactor real64 0.5 Factor to apply to the `CFL condition <http://en.wikipedia.org/wiki/Courant-Friedrichs-Lewy_condition>`_ when calculating the maximum allowable time step. Values should be in the interval (0,1]
discretization string required Name of discretization object to use for this solver.
fluidNames string_array required Names of fluid constitutive models for each region.
initialDt real64 1e+99 Initial time-step value required by the solver to the event manager.
inputFluxEstimate real64 1 Initial estimate of the input flux used only for residual scaling. This should be essentially equivalent to the input flux * dt.
logLevel integer 0 Log level
maxCompFractionChange real64 1 Maximum (absolute) change in a component fraction between two Newton iterations
meanPermCoeff real64 1 Coefficient to move between harmonic mean (1.0) and arithmetic mean (0.0) for the calculation of permeability between elements.
name string required A name is required for any non-unique nodes
relPermNames string_array required Name of the relative permeability constitutive model to use
solidNames string_array required Names of solid constitutive models for each region.
targetRegions string_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager.
temperature real64 required Temperature
useMass integer 0 Use mass formulation instead of molar
LinearSolverParameters node unique :ref:`XML_LinearSolverParameters`
NonlinearSolverParameters node unique :ref:`XML_NonlinearSolverParameters`
============================= ============ ======== ======================================================================================================================================================================================================================================================================================================================


Loading