-
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
[Fluid-SDEM] Dynamic vms dem coupled #8018
Conversation
rElem.Check(r_process_info); | ||
i->CalculateLocalVelocityContribution(LHS, RHS, r_process_info); | ||
std::cout.precision(10); | ||
//std::cout << i->Info() << RHS << std::endl; |
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.
remove comments
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 this specific case I'd keep it (these are really useful when it is required to update the test values due to a formulation upgrade or correction).
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 see.
// Auxiliary coefficient StaticTauOne*TauTwo/Dt that appears on the pressure subscale model | ||
// This coefficient comes from mass equation: div(u^n+1 + u^n) = 0 setting to 0 is to consider | ||
// div(u^n+1) = 0 | ||
TauP = 0.0; |
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 would remove all reference to this term. If we want, we can add it later, but it is better to leave everything clean
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.
Indeed, aren't these the standard tau constant used in the base NS formulation? If so it is the base class method could be used.
// Some terms are the same for all velocity components, calculate them once for each i,j | ||
|
||
// Skew-symmetric convective term 1/2( v*grad(u)*u - grad(v) uu ) | ||
//double K = 0.5*(rN[i]*AGradN[j] - AGradN[i]*rN[j]); |
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 do not remember discussing the possibility of using this skew-symmetric form. It could be something else to study in the future
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 is inherited from the d_vms.cpp
, I prefer to keep this line commented.
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.
All minor changes
GeometryType::Pointer pGeom, | ||
Properties::Pointer pProperties) const override; | ||
|
||
void Calculate( |
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.
Did you really need to override all these 'Calculate' functions?
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.
Agree. Indeed in your implementation you are precluding the access to the base class ones.
"element_name": "DVMSDEMCoupled" | ||
}""") | ||
settings.ValidateAndAssignDefaults(default_settings) | ||
|
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.
Consider the changes in #7997
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.
Why did you include the dynamic_tau in the DVMS settings? It is not used in the element...
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.
It is used in the base quasi-static class to calculate the stabilization constants.
const ProcessInfo& rCurrentProcessInfo) {} | ||
|
||
template <class TElementData> | ||
void DVMSDEMCoupled<TElementData>::Calculate( | ||
const Variable<array_1d<double, 3>>& rVariable, | ||
array_1d<double, 3>& rOutput, | ||
const ProcessInfo& rCurrentProcessInfo) { | ||
// Lumped projection terms | ||
if (rVariable == ADVPROJ) { | ||
this->CalculateProjections(rCurrentProcessInfo); | ||
} | ||
} | ||
|
||
template <class TElementData> | ||
void DVMSDEMCoupled<TElementData>::Calculate( | ||
const Variable<Vector>& rVariable, | ||
Vector& rOutput, | ||
const ProcessInfo& rCurrentProcessInfo) {} | ||
|
||
template <class TElementData> | ||
void DVMSDEMCoupled<TElementData>::Calculate( | ||
const Variable<Matrix>& rVariable, | ||
Matrix& rOutput, | ||
const ProcessInfo& rCurrentProcessInfo) {} | ||
|
||
template <class TElementData> | ||
void DVMSDEMCoupled<TElementData>::Initialize(const ProcessInfo& rCurrentProcessInfo) | ||
{ | ||
// Base class does things with constitutive law here. | ||
DVMS<TElementData>::Initialize(rCurrentProcessInfo); | ||
} | ||
|
||
template <class TElementData> | ||
void DVMSDEMCoupled<TElementData>::FinalizeSolutionStep(const ProcessInfo& rCurrentProcessInfo) | ||
{ | ||
DVMS<TElementData>::FinalizeSolutionStep(rCurrentProcessInfo); | ||
} | ||
|
||
template <class TElementData> | ||
void DVMSDEMCoupled<TElementData>::InitializeNonLinearIteration(const ProcessInfo& rCurrentProcessInfo) | ||
{ | ||
DVMS<TElementData>::InitializeNonLinearIteration(rCurrentProcessInfo); | ||
} | ||
/////////////////////////////////////////////////////////////////////////////////////////////////// | ||
// Inquiry | ||
|
||
template< class TElementData > | ||
int DVMSDEMCoupled<TElementData>::Check(const ProcessInfo &rCurrentProcessInfo) const | ||
{ | ||
int out = DVMS<TElementData>::Check(rCurrentProcessInfo); | ||
|
||
return out; | ||
} | ||
|
||
/////////////////////////////////////////////////////////////////////////////////////////////////// | ||
|
||
template< class TElementData > | ||
void DVMSDEMCoupled<TElementData>::GetValueOnIntegrationPoints( | ||
Variable<array_1d<double, 3 > > const& rVariable, | ||
std::vector<array_1d<double, 3 > >& rValues, | ||
ProcessInfo const& rCurrentProcessInfo) | ||
{ | ||
DVMS<TElementData>::GetValueOnIntegrationPoints(rVariable,rValues,rCurrentProcessInfo); | ||
} | ||
|
||
template< class TElementData > | ||
void DVMSDEMCoupled<TElementData>::GetValueOnIntegrationPoints( | ||
Variable<double> const& rVariable, | ||
std::vector<double>& rValues, | ||
ProcessInfo const& rCurrentProcessInfo) | ||
{ | ||
DVMS<TElementData>::GetValueOnIntegrationPoints(rVariable,rValues,rCurrentProcessInfo); | ||
} | ||
|
||
template <class TElementData> | ||
void DVMSDEMCoupled<TElementData>::GetValueOnIntegrationPoints( | ||
Variable<array_1d<double, 6>> const& rVariable, | ||
std::vector<array_1d<double, 6>>& rValues, | ||
ProcessInfo const& rCurrentProcessInfo) | ||
{ | ||
DVMS<TElementData>::GetValueOnIntegrationPoints(rVariable,rValues,rCurrentProcessInfo); | ||
} | ||
|
||
template <class TElementData> | ||
void DVMSDEMCoupled<TElementData>::GetValueOnIntegrationPoints( | ||
Variable<Vector> const& rVariable, | ||
std::vector<Vector>& rValues, | ||
ProcessInfo const& rCurrentProcessInfo) | ||
{ | ||
DVMS<TElementData>::GetValueOnIntegrationPoints(rVariable,rValues,rCurrentProcessInfo); | ||
} | ||
|
||
template <class TElementData> | ||
void DVMSDEMCoupled<TElementData>::GetValueOnIntegrationPoints( | ||
Variable<Matrix> const& rVariable, | ||
std::vector<Matrix>& rValues, | ||
ProcessInfo const& rCurrentProcessInfo) | ||
{ | ||
DVMS<TElementData>::GetValueOnIntegrationPoints(rVariable,rValues,rCurrentProcessInfo); | ||
} |
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.
Why overriding
all these methods?
if (rVariable == ADVPROJ) { | ||
this->CalculateProjections(rCurrentProcessInfo); | ||
} |
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.
An else
statement calling the base class Calculate
should be added in case the provided variable it's not implemented in here.
DVMSDEMCoupled(IndexType NewId, GeometryType::Pointer pGeometry, Properties::Pointer pProperties); | ||
|
||
/// Destructor. | ||
~DVMSDEMCoupled() 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.
Destructors shouldn't be override
specified (see here).
applications/FluidDynamicsApplication/custom_elements/d_vms_dem_coupled.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.
I think this is ready for merging
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.
PLease change what we discussed about the evaluatiion of the error at the Gauss points
Description
This PR is aimed to develop the formulation of the generalized N-S equations including the porosity and using the dynamic subscales for both ASGS and OSS methods.
Please mark the PR with appropriate tags:
Changelog
The changes of this PR are:
d_vms_dem_coupled.cpp
derived fromd_vms.cpp
navier_stokes_vms_monolithic_DEMCoupled.py
to add the new element to the solver.