-
Notifications
You must be signed in to change notification settings - Fork 279
[GeoMechanicsApplication] Add coupling calculator components #14162
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
base: master
Are you sure you want to change the base?
Conversation
…ing with clang-format
…upling matrix calculation in the equation of motion utils
…he coupling calculators)
…ore specific info
| InputProvider(std::function<const Matrix&()> GetNpContainer, | ||
| Geo::BMatricesGetter GetBMatrices, | ||
| std::function<Vector()> GetVoigtVector, | ||
| Geo::IntegrationCoefficientsGetter GetIntegrationCoefficients, | ||
| std::function<std::vector<double>()> GetBiotCoefficients, | ||
| std::function<std::vector<double>()> GetDegreesOfSaturation, | ||
| std::function<Vector()> GetNodalVelocities, | ||
| std::function<double()> GetVelocityCoefficient) |
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.
I'd like to add the aliases for this provider later (but let me know if you think differently). I think we should also discuss if we'd like a new alias for every type of getter, or if we'd like more generic aliases (e.g. MatrixGetter instead of having different ones for BMatricesGetter and NpContainerGetter)
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.
I have been struggling with the same. For std::function<std::vector> we have Geo::IntegrationCoefficientsGetter. Using that for other coefficients ( here Biot, DegreeOfSaturation, Bishop ) looks unnatural. We could change its name to CoefficientsGetter and use it throughout the providers.
WPK4FEM
left a comment
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.
Dear Richard,
Thank you for making these coupling calculators available. A good step towards having a complete set of calculators for elements.
Please have an in depth look at the remarks about the velocity coefficient. It's use does not align with my expectation, I think it does not belong in the calculator and causes an incorrect RHS the way it's used. Try to prove that I'm wrong off course.
Regards, Wijtze Pieter
| InputProvider(std::function<const Matrix&()> GetNpContainer, | ||
| Geo::BMatricesGetter GetBMatrices, | ||
| std::function<Vector()> GetVoigtVector, | ||
| Geo::IntegrationCoefficientsGetter GetIntegrationCoefficients, | ||
| std::function<std::vector<double>()> GetBiotCoefficients, | ||
| std::function<std::vector<double>()> GetDegreesOfSaturation, | ||
| std::function<Vector()> GetNodalVelocities, | ||
| std::function<double()> GetVelocityCoefficient) |
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.
I have been struggling with the same. For std::function<std::vector> we have Geo::IntegrationCoefficientsGetter. Using that for other coefficients ( here Biot, DegreeOfSaturation, Bishop ) looks unnatural. We could change its name to CoefficientsGetter and use it throughout the providers.
| std::function<std::vector<double>()> GetBiotCoefficients, | ||
| std::function<std::vector<double>()> GetDegreesOfSaturation, | ||
| std::function<Vector()> GetNodalVelocities, | ||
| std::function<double()> GetVelocityCoefficient) |
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.
The velocity coefficient is more part of the time integration scheme than of the fill in of the matrix. I wonder if we can keep it outside the calculator.
|
|
||
| typename BaseType::RHSVectorType RHSContribution() override | ||
| { | ||
| return prod(CalculateCouplingMatrix(), mInputProvider.GetNodalVelocities()); |
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.
I think that the velocity coefficient should not be part of the RHS computation. Here it is because it is included in CalculateCouplingMatrix.
| const auto biot_coefficients = mInputProvider.GetBiotCoefficients(); | ||
| const auto bishop_coefficients = mInputProvider.GetBishopCoefficients(); | ||
| const auto np_container = mInputProvider.GetNpContainer(); | ||
| for (std::size_t i = 0; i < mInputProvider.GetBMatrices().size(); ++i) { |
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.
We are looping over integration points here. There should be as many integration_coefficients as B matrices, Biot coefficients, Bishop coefficients and shape function values in the NpContainer. For me the loop control reads more naturally as:
| for (std::size_t i = 0; i < mInputProvider.GetBMatrices().size(); ++i) { | |
| for ( auto i = std::size_t{0}; i < mInputProvider.GetIntegrationCoefficients().size(); ++i) { |
| typename BaseType::LHSMatrixType coupling_contribution; | ||
| GeoTransportEquationUtilities::CalculateCouplingMatrix( |
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.
Is it impossible to use the version where the return value is the coupling matrix contribution?
📝 Description$\leftrightarrow$ displacement coupling. Due to overlap in the two calculations, the
This PR adds two calculators, the
UPCouplingCalculatorand thePUCouplingCalculatorto calculate left and right hand side contributions regarding waterPUCouplingCalculatorre-uses theUPCouplingCalculator.Note that no connection is made yet to an existing element (e.g. the interface element).
🆕 Changelog
UPCouplingCalculatorandPUCouplingCalculator