Skip to content

Commit

Permalink
Bugfixing in the monolithic scheme of HM coupled with T in the stagge…
Browse files Browse the repository at this point in the history
…red manner
  • Loading branch information
wenqing committed Feb 5, 2016
1 parent 9337b91 commit 1b2813d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions FEM/rf_mfp_new.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2055,7 +2055,7 @@ double MFPCalcFluidsHeatCapacity(CFiniteElementStd* assem)
CFluidProperties* m_mfp = NULL;
CRFProcess* m_pcs = assem->cpl_pcs;
//if (m_pcs->pcs_type_name.find("MULTI_PHASE_FLOW")!=string::npos)
if (m_pcs->type == 1212) // non-isothermal multi-phase flow
if (m_pcs && m_pcs->type == 1212) // non-isothermal multi-phase flow
{
// Capillary pressure
PG = assem->interpolate(assem->NodalValC1);
Expand Down Expand Up @@ -2084,7 +2084,7 @@ double MFPCalcFluidsHeatCapacity(CFiniteElementStd* assem)
heat_capacity_fluids = assem->FluidProp->Density() *
assem->FluidProp->SpecificHeatCapacity();

if(m_pcs->type != 1) // neither liquid nor ground water flow
if(m_pcs && m_pcs->type != 1) // neither liquid nor ground water flow
{
// pressure
PG = assem->interpolate(assem->NodalValC1);
Expand Down
5 changes: 3 additions & 2 deletions FEM/rf_mmp_new.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2639,7 +2639,8 @@ double* CMediumProperties::HeatConductivityTensor(int number)
FLOW = true;
if (FLOW) //WW
{
if (Fem_Ele_Std->cpl_pcs->type == 1212) // Multi-phase WW
CRFProcess const* cpl_pcs = Fem_Ele_Std->cpl_pcs;
if (cpl_pcs && cpl_pcs->type == 1212) // Multi-phase WW
{
double PG = Fem_Ele_Std->interpolate(
Fem_Ele_Std->NodalValC1); // Capillary pressure
Expand Down Expand Up @@ -2673,7 +2674,7 @@ double* CMediumProperties::HeatConductivityTensor(int number)
= Fem_Ele_Std->FluidProp->HeatConductivity();
Sw = 1;

if (Fem_Ele_Std->cpl_pcs->type != 1)
if (cpl_pcs && cpl_pcs->type != 1)
{
double PG = Fem_Ele_Std->interpolate(
Fem_Ele_Std->NodalValC1); // Capillary pressure
Expand Down

0 comments on commit 1b2813d

Please sign in to comment.