-
Notifications
You must be signed in to change notification settings - Fork 250
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
[RANS] QSVMS Expansion Step 1 - Add Constitutive Law Support #7949
Conversation
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.
Long story short, we need this to customize the effective viscosity calculation but keeping the rest of the constitutive law ¿right?. Honestly, I'm not very positive about introducing a template argument in the constitutive law after the experience of the mechanical ones.
In this regard, I note that we are facing a very similar issue with the artificial magnitudes (@pau-mar @RiccardoRossi). So far we decided to duplicate the constitutive law, which is without discussion a temporary solution.
I want to confirm that this is the problematic and to better discuss it before merging.
This is exactly what I want. I am open to suggestions. This was the only way i found which is easier to look at, extend and manage
I agree. Even ConstitutiveLaw::Parameters are also kind of complicated, and I don't totally get the signature of the |
you can get documentation of the CL in the wiki. In my opinion using the CL is a must... |
@RiccardoRossi thanks :).... A small question, I'm just curious, why does Kratos/kratos/includes/constitutive_law.h Line 745 in 261a51e
|
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.
But why don't deriving them from the standard newtonian laws? At the end we just need to override
the effective viscosity calculation method and enhance the check one to be sure that the TURBULENT_VISCOSITY
is in the nodal data.
Then its gonna be same as the previous approach, (The template paramter was made the base class) I thought that is what you wanted to avoid, have dependencies which makes developement harder. Previously what I had was something like this template<class TBaseClassType>
class RansConstitutiveLaw : public TBaseClassType
{
protected:
// overriding the GetEffectiveViscosityMethod
};
template class RansConstitutiveLaw<Newtonian2DLaw>; And proposed deriving also will have the same (apart from the template argument) class RansConstitutive2DLaw : public Newtonian2DLaw
{
protected:
// overriding the GetEffectiveViscosityMethod
}; I dont see much difference in two methods
What do you think? (Thats why recreated the whole laws from scratch so it can be decoupled for furture developements and expansions - current state of this PR) |
The point is that I can't foresee so much room for further developments and expansions for a Newtonian law. The idea of method 2 is precisely that, avoid the template argument. Note that as it is right now it requires 4 files but only one method |
@rubenzorrilla Done. Could you have a look? |
applications/RANSApplication/custom_constitutive/rans_newtonian_2d_law.cpp
Outdated
Show resolved
Hide resolved
applications/RANSApplication/custom_constitutive/rans_newtonian_2d_law.cpp
Outdated
Show resolved
Hide resolved
…n_2d_law.cpp Co-authored-by: Rubén Zorrilla <rubenzorrillamartinez@hotmail.com>
…n_2d_law.cpp Co-authored-by: Rubén Zorrilla <rubenzorrillamartinez@hotmail.com>
/** | ||
* Destructor. | ||
*/ | ||
~RansNewtonian2DLaw() override; |
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.
~RansNewtonian2DLaw() override; | |
~RansNewtonian2DLaw(); |
applications/RANSApplication/custom_constitutive/rans_newtonian_3d_law.cpp
Outdated
Show resolved
Hide resolved
applications/RANSApplication/custom_constitutive/rans_newtonian_3d_law.cpp
Outdated
Show resolved
Hide resolved
applications/RANSApplication/custom_constitutive/rans_newtonian_3d_law.h
Outdated
Show resolved
Hide resolved
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.
Just a few minor comments.
…n_3d_law.cpp Co-authored-by: Rubén Zorrilla <rubenzorrillamartinez@hotmail.com>
…n_3d_law.cpp Co-authored-by: Rubén Zorrilla <rubenzorrillamartinez@hotmail.com>
…m/KratosMultiphysics/Kratos into rans/qs_vms/add_constitutive_laws
Hi @rubenzorrilla , I addressed all of your comments. Could you have a look? |
thanks @rubenzorrilla :) |
Description
This is the first step towards expanding RANS to support QSVMS (And all other stabilization methods if requred). This introduces templated
RansConstitutiveLawExtension
which can be used to extend easilyFluidConstitutiveLaw
just by providing the type of it as a template argument.Changelog
RansConstitutiveLawExtension
RansNewtonian2DLaw
as used exampleRansNewtonian3DLaw
as used example