Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mass coefficients of LiquidFlow] scaled drho_dp with who_w #148

Merged
merged 2 commits into from
Jul 16, 2019
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
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ elseif (OGS_CONFIG STREQUAL GEMS)
set(OGS_CONFIG_DEFAULT_CHEMSOLVER "GEMS" CACHE INTERNAL "" FORCE)
elseif (OGS_CONFIG STREQUAL IPQC)
set(OGS_CONFIG_DEFAULT_CHEMSOLVER "IPQC" CACHE INTERNAL "" FORCE)
if(PARALLEL_USE_MPI)
set(OGS_CONFIG_DEFAULT_LSOLVER "SP" CACHE INTERNAL "" FORCE)
endif()
elseif (OGS_CONFIG STREQUAL PQC)
set(OGS_CONFIG_DEFAULT_LSOLVER "SP" CACHE INTERNAL "" FORCE)
set(OGS_CONFIG_DEFAULT_CHEMSOLVER "PQC" CACHE INTERNAL "" FORCE)
Expand Down
9 changes: 6 additions & 3 deletions FEM/fem_ele_std.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1578,17 +1578,20 @@ double CFiniteElementStd::CalCoefMass()
val = MediaProp->StorageFunction(Index, unit, pcs->m_num->ls_theta);
double drho_dp_rho = 0.0;
// get drho/dp/rho from material model or direct input
const double rho_val = FluidProp->Density();
if (FluidProp->compressibility_model_pressure > 0)
{
const double rho_val = FluidProp->Density();
double arg[2];
arg[0] = interpolate(NodalVal1); // p
arg[1] = interpolate(NodalValC1); // T
drho_dp_rho = FluidProp->drhodP(arg) / rho_val;
}
else
{
drho_dp_rho = FluidProp->drho_dp;
drho_dp_rho =
rho_val > DBL_EPSILON
? FluidProp->drho_dp * FluidProp->rho_0 / rho_val
: 0.0;
}

const double poro_val =
Expand All @@ -1603,7 +1606,7 @@ double CFiniteElementStd::CalCoefMass()
h_fem = this;
storage_effstress =
MediaProp->StorageFunctionEffStress(Index, nnodes, h_fem);
val *= storage_effstress;
val += storage_effstress;
}

// val /= time_unit_factor;
Expand Down
2 changes: 1 addition & 1 deletion FEM/rf_mmp_new.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8001,7 +8001,7 @@ double CMediumProperties::StorageFunction(long index, double* gp, double theta)
return storage;
}

// AS:08.2012 storgae function eff stress
// AS:08.2012 storage function of effective stress
double CMediumProperties::StorageFunctionEffStress(long index, int nnodes,
CFiniteElementStd* h_fem)
{
Expand Down