diff --git a/FEM/fem_ele_std.cpp b/FEM/fem_ele_std.cpp index ad9066e58..78b69d894 100644 --- a/FEM/fem_ele_std.cpp +++ b/FEM/fem_ele_std.cpp @@ -25,10 +25,10 @@ #include "mathlib.h" // Problems //#include "rf_mfp_new.h" +#include "SparseMatrixDOK.h" +#include "eos.h" #include "rf_mmp_new.h" #include "rf_msp_new.h" -#include "eos.h" -#include "SparseMatrixDOK.h" #include "pcs_dm.h" // displacement coupled #include "rfmat_cp.h" @@ -61,8 +61,8 @@ using Math_Group::CSparseMatrix; extern "C" { #include /* prototypes for CVODE fcts., consts. */ -#include /* serial N_Vector types, fcts., macros */ #include /* prototype for CVDense */ +#include /* serial N_Vector types, fcts., macros */ #include /* definitions DlsMat DENSE_ELEM */ #include /* definition of type realtype */ } @@ -1584,6 +1584,10 @@ double CFiniteElementStd::CalCoefMass() double arg[2]; arg[0] = interpolate(NodalVal1); // p arg[1] = interpolate(NodalValC1); // T + if (cpl_pcs) + arg[1] = interpolate(NodalValC1); + else + arg[1] = PhysicalConstant::CelsiusZeroInKelvin + 20.0; drho_dp_rho = FluidProp->drhodP(arg) / rho_val; } else @@ -1732,7 +1736,10 @@ double CFiniteElementStd::CalCoefMass() { // drho_dp from rho-p-T relation double arg[2]; arg[0] = PG; - arg[1] = interpolate(NodalValC1); // T + if (cpl_pcs) + arg[1] = interpolate(NodalValC1); + else + arg[1] = PhysicalConstant::CelsiusZeroInKelvin + 20.0; drho_dp_rho = FluidProp->drhodP(arg) / rhow; } else @@ -2268,7 +2275,7 @@ void CFiniteElementStd::CalCoefLaplace(bool Gravity, int ip) if (T_Flag) variables[1] = interpolate(NodalValC); // OK4709 temperature else - variables[1] = 15; // WX + variables[1] = PhysicalConstant::CelsiusZeroInKelvin + 20.0; // OK4709 mat_fac = FluidProp->Viscosity(variables); @@ -2628,7 +2635,7 @@ void CFiniteElementStd::CalCoefLaplace(bool Gravity, int ip) if (cpl_pcs) TG = interpolate(NodalValC1); else - TG = 296.0; + TG = PhysicalConstant::CelsiusZeroInKelvin + 20.0; MediaProp->CalStressPermeabilityFactor(w, TG); for (size_t i = 0; i < dim; i++) tensor[i * dim + i] *= w[i]; @@ -6479,9 +6486,8 @@ void CFiniteElementStd::CalcSolidDensityRate() const double rhoTil = 0.1; const double omega = 2.0 * 3.1416; gp_ele->rho_s_curr[gp] = - rhoSR0 + - rhoTil * sin(omega * aktuelle_zeit) / - (1.0 - poro); // TN Test mass transfer + rhoSR0 + rhoTil * sin(omega * aktuelle_zeit) / + (1.0 - poro); // TN Test mass transfer gp_ele->q_R[gp] = rhoTil * omega * cos(omega * aktuelle_zeit) / (1.0 - poro); // TN Test mass transfer } @@ -9014,9 +9020,7 @@ void CFiniteElementStd::Assemble_strainCPL(const int phase) */ //************************************************************************** #if defined(USE_PETSC) // && !defined(other parallel libs)//03~04.3012. WW -void CFiniteElementStd::Assemble_strainCPL_Matrix(const double, const int) -{ -} +void CFiniteElementStd::Assemble_strainCPL_Matrix(const double, const int) {} #else void CFiniteElementStd::Assemble_strainCPL_Matrix(const double fac, const int phase) @@ -11955,9 +11959,8 @@ void CFiniteElementStd::CalcEnergyNorm(double& err_norm0, double& err_normn) for (i = 0; i < nnodes; i++) { #if defined(USE_PETSC) // || defined(other parallel libs)//07.3012. WW - NodalVal0[i] = atol + - rtol * max(fabs(pcs->GetNodeValue(nodes[i], idx)), - fabs(x_n[nodes[i] * dof_n])); + NodalVal0[i] = atol + rtol * max(fabs(pcs->GetNodeValue(nodes[i], idx)), + fabs(x_n[nodes[i] * dof_n])); #else NodalVal0[i] = atol + rtol * max(fabs(pcs->GetNodeValue(nodes[i], idx)), diff --git a/FEM/rf_mfp_new.cpp b/FEM/rf_mfp_new.cpp index 55ee8f40e..158765a59 100644 --- a/FEM/rf_mfp_new.cpp +++ b/FEM/rf_mfp_new.cpp @@ -38,8 +38,8 @@ extern double GetCurveValue(int, int, double, int*); #include "rf_REACT_GEM.h" #endif -#include "PhysicalConstant.h" #include "Material/Fluid/Density/WaterDensityIAPWSIF97Region1.h" +#include "PhysicalConstant.h" /* Umrechnungen SI - Amerikanisches System */ // WW #include "steam67.h" @@ -1053,7 +1053,19 @@ void CFluidProperties::CalPrimaryVariable( // MX m_pcs = PCSGet("HEAT_TRANSPORT"); m_pcs = PCSGet(pcs_name_vector[i], true); if (!m_pcs) - return; // MX + { + if (pcs_name_vector[i].find("TEMPERATURE1") != std::string::npos) + { + const double T_ref = + PhysicalConstant::CelsiusZeroInKelvin + 20.0; + primary_variable_t0[i] = T_ref; + primary_variable_t1[i] = T_ref; + primary_variable[i] = T_ref; + continue; + } + else + return; + } nidx0 = m_pcs->GetNodeValueIndex(pcs_name_vector[i]); nidx1 = nidx0 + 1;