-
Notifications
You must be signed in to change notification settings - Fork 249
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
Geo/line piping element #12770
Geo/line piping element #12770
Conversation
…not compile, so bad )
…Step. Reformatted. Some sonar cloud warnings resolved.
BoundedMatrix<double, TNumNodes, TNumNodes> CalculatePermeabilityMatrix( | ||
const GeometryType::ShapeFunctionsGradientsType& rShapeFunctionGradients, | ||
const Vector& rIntegrationCoefficients) const | ||
{ | ||
RetentionLaw::Parameters RetentionParameters(GetProperties()); | ||
const auto& r_properties = GetProperties(); | ||
const double dynamic_viscosity_inverse = 1.0 / r_properties[DYNAMIC_VISCOSITY]; | ||
|
||
auto constitutive_matrix = FillPermeabilityMatrix(r_properties[PIPE_HEIGHT]); | ||
|
||
auto result = BoundedMatrix<double, TNumNodes, TNumNodes>{ZeroMatrix{TNumNodes, TNumNodes}}; | ||
for (unsigned int integration_point_index = 0; | ||
integration_point_index < GetGeometry().IntegrationPointsNumber(GetIntegrationMethod()); | ||
++integration_point_index) { | ||
result += GeoTransportEquationUtilities::CalculatePermeabilityMatrix<TDim, TNumNodes>( | ||
rShapeFunctionGradients[integration_point_index], dynamic_viscosity_inverse, | ||
constitutive_matrix, 1.0, rIntegrationCoefficients[integration_point_index]); | ||
} | ||
|
||
return result; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the experiment branch with calculators (see #12763), the calculation of the permeability matrix is delegated to these new calculators. Here, the calculation is of course slightly different. In the longer term, should we have a version of the permeability calculator that does it slightly different for piping vs 'normal', or should we handle that differently?
Looping @avdg81
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a great start to introduce a line element for piping analysis. I have a few questions and several suggestions, but none of them is major.
...echanicsApplication/tests/cpp_tests/custom_elements/test_geo_steady_state_piping_element.cpp
Outdated
Show resolved
Hide resolved
...echanicsApplication/tests/cpp_tests/custom_elements/test_geo_steady_state_piping_element.cpp
Outdated
Show resolved
Hide resolved
...echanicsApplication/tests/cpp_tests/custom_elements/test_geo_steady_state_piping_element.cpp
Outdated
Show resolved
Hide resolved
PointerVector<Node> nodes; | ||
nodes.push_back(r_model_part.CreateNewNode(0, 0.0, 0.0, 0.0)); | ||
nodes.push_back(r_model_part.CreateNewNode(1, 1.0, 0.0, 0.0)); | ||
const auto p_geometry = std::make_shared<Line2D2<Node>>(nodes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be possible to reuse the first helper function here (i.e. CreateNodes
)...? I see there is a minor difference: here you explicitly request the model part to create new nodes, whereas the helper function creates "free" nodes. Not sure whether that is a problem.
PointerVector<Node> nodes; | |
nodes.push_back(r_model_part.CreateNewNode(0, 0.0, 0.0, 0.0)); | |
nodes.push_back(r_model_part.CreateNewNode(1, 1.0, 0.0, 0.0)); | |
const auto p_geometry = std::make_shared<Line2D2<Node>>(nodes); | |
const auto p_geometry = std::make_shared<Line2D2<Node>>(CreateNodes()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
PointerVector<Node> nodes; | ||
nodes.push_back(r_model_part.CreateNewNode(1, 0.0, 0.0, 0.0)); | ||
nodes.push_back(r_model_part.CreateNewNode(2, 1.0, 0.0, 0.0)); | ||
const auto p_geometry = std::make_shared<Line2D2<Node>>(nodes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you believe that the previous suggestion makes sense, then you may want to apply it here, too:
PointerVector<Node> nodes; | |
nodes.push_back(r_model_part.CreateNewNode(1, 0.0, 0.0, 0.0)); | |
nodes.push_back(r_model_part.CreateNewNode(2, 1.0, 0.0, 0.0)); | |
const auto p_geometry = std::make_shared<Line2D2<Node>>(nodes); | |
const auto p_geometry = std::make_shared<Line2D2<Node>>(CreateNodes()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
applications/GeoMechanicsApplication/custom_elements/geo_steady_state_Pw_piping_element.h
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_elements/geo_steady_state_Pw_piping_element.h
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_elements/geo_steady_state_Pw_piping_element.h
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_elements/geo_steady_state_Pw_piping_element.h
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_elements/geo_steady_state_Pw_piping_element.h
Outdated
Show resolved
Hide resolved
...echanicsApplication/tests/cpp_tests/custom_elements/test_geo_steady_state_piping_element.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_elements/geo_steady_state_Pw_piping_element.h
Show resolved
Hide resolved
…for pipe_height function ( review comments by Anne )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR looks ready to go to me.
📝 Description
Based on the line Pw element a minimal line piping element is created.
Todo