Repository navigation
Improvment and bugfixing in CFiniteElementVec - #105
Conversation
| { | ||
| nodal_pore_p[i] = (biot < 0.0 && _nodal_p1[i] < 0.0) ? | ||
| 0.0 : LoadFactor * S_Water * _nodal_p1[i]; | ||
| nodal_pore_p[i] = LoadFactor * _nodal_S[i] * _nodal_p1[i]; |
There was a problem hiding this comment.
Element saturation to nodal saturation.
| { | ||
| const double p0 = h_pcs->GetNodeValue(nodes[i], idx_p1_ini); | ||
| const double Sat0 = LoadFactor * m_mmp->SaturationCapillaryPressureFunction(-p0); | ||
| nodal_pore_p[i] -= (p0 > 0.0) ? LoadFactor * Sat0 * p0 : 0.0; |
There was a problem hiding this comment.
removed the restriction of positive pore pressure in the total stress calculation for the partially saturated flow.
| { | ||
| NodalVal2[i] = dm_pcs->GetNodeValue(nodes[i], Idx_dm1[0]); | ||
| NodalVal3[i] = dm_pcs->GetNodeValue(nodes[i], Idx_dm1[1]); | ||
| NodalVal2[i] = dm_pcs->GetNodeValue(nodes[i], Idx_dm0[0]); |
There was a problem hiding this comment.
Fixed a bug in the monolithic H2M.
| // 07.04.2010 WW | ||
| bool done; | ||
| ElementValue_DM* eleV_DM = NULL; | ||
| if ((fem_dm->Flow_Type == 0 || fem_dm->Flow_Type == 2 || fem_dm->Flow_Type == 1) && Neglect_H_ini == 2) |
There was a problem hiding this comment.
Removed the repeated code.
| Sw += shapefct[i] * _nodal_S[i]; | ||
| } | ||
| rho = (1. - porosity) * fabs(smat->Density()) + porosity * Sw * density_fluid; | ||
| const double density_fluid = (mfp_vector.empty()) ? m_mfp->Density() : 0.0; |
There was a problem hiding this comment.
i am puzzled here. why should the fluid density be zero if mfp_vector is not empty?
There was a problem hiding this comment.
Sorry, it is wrong. Removed the ternary operator.
| const double porosity = m_mmp->Porosity(this); | ||
|
|
||
| if (Flow_Type == 2 || Flow_Type == 3) | ||
| double rho = (1. - porosity) * fabs(smat->Density()) |
There was a problem hiding this comment.
since smat->Density() is positive (line 738), fabs is not needed.
| return rho; | ||
|
|
||
| // If negative value is given in the .msp file, gravity by solid is skipped | ||
| if (smat->Density() > 0.0) |
| double fac = 1.0; | ||
| if (Flow_Type == 1) | ||
| fac = -1.0; | ||
| const double fac = (_flow_type == FiniteElement::RICHARDS_FLOW) ? -1. : 1.; |
There was a problem hiding this comment.
could you write a comment here explaining what is fac variable.
| if ((GetCurveValue(ExcavCurve, 0, aktuelle_zeit, &valid) + ExcavBeginCoordinate) | ||
| > (ele_center[ExcavDirection]) | ||
| && (ele_center[ExcavDirection] - ExcavBeginCoordinate) > -0.001) | ||
| const double expected_coordinate = |
There was a problem hiding this comment.
i see these lines several times. can you create a function for this and remove repeated codes?
…ess results of TH_usM modelling
…CFiniteElementVec
in the the local assmebly.
to remove the duplicated pieces of code.
8992194 to
c495882
Compare
c495882 to
efe1ed9
Compare
| if ((GetCurveValue(pcs->ExcavCurve, 0, aktuelle_zeit, &valid) + pcs->ExcavBeginCoordinate) | ||
| > (ele_center[pcs->ExcavDirection]) | ||
| && (ele_center[pcs->ExcavDirection] - pcs->ExcavBeginCoordinate) > -0.001) | ||
| const double expected_coordinate = |
There was a problem hiding this comment.
isn't it possible to use the new function isPointInExcavatedDomain() here?
There was a problem hiding this comment.
Replace the lines with the new function.
| double const* ele_center(elem->GetGravityCenter()); | ||
| if ((GetCurveValue(pcs->ExcavCurve, 0, aktuelle_zeit, &valid) + pcs->ExcavBeginCoordinate) | ||
| < (ele_center[pcs->ExcavDirection])) | ||
| const double expected_coordinate = |
There was a problem hiding this comment.
Just took a loot. Here the if-condition is different from that in the new function.
… code duplication
|
looks good |
This PR improves CFiniteElementVec, and it contains
The changes in 2) improves the computation solutions of the benchmarks for the THM coupled processes. Therefore the reference results of the affected benchmarks have to be updated too.