-
Notifications
You must be signed in to change notification settings - Fork 57
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
Scalar vel diff #116
Scalar vel diff #116
Conversation
A note of clarification: Tensor velocity solver is needed whenever the (scalar) viscosity has a spatial dependence (typically when it depends on state variables that have a spatial dependence). |
Okay, thanks for pointing that out. So this should only be used in the case when you have a constant viscosity throughout the domain equal to |
I believe so....I worry about the word "only" though. I may not have a global enough view of the apps. |
Constant coefficient and divu = 0 are the requirements
…Sent from my iPhone
On Dec 3, 2021, at 8:13 AM, Marc Day ***@***.***> wrote:
Okay, thanks for pointing that out. So this should only be used in the case
when you have a constant viscosity throughout the domain equal to
vel_visc_coef?
I believe so....I worry about the word "only" though. I may not have a
global enough view of the apps.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#116 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACRE6YW7OTIHNQC3MZXZVTLUPDUC7ANCNFSM5JKAQTWQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
In that case, I should probably set the default |
Source/Diffusion.cpp
Outdated
for (int comp = 1; comp < nComp; comp++) { | ||
if (a_is_diffusive[comp] != diffType) { | ||
amrex::Abort("All the scalars must be either diffusive or non-diffusive when calling diffuse_scalar"); | ||
if(navier_stokes->do_tensor_visc){ |
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 if is not right. It's always required that all the scalars included here are either all diffusive or non-diffusive.
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.
Okay, I have taken that part out - is it okay now? The scalars you're sending to diffuse_scalar()
are just the velocity components, so in any case if the velocity is not diffusive, all the components will not be diffusive and the function will exit.
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 would be good to add a check at the beginning of diffuse_scalar
that ensures that velocity is done on it's own and not with scalars. The way beta is set requires this.
|
It would also be good to have a check ensuring that we can only use this with |
Source/NavierStokes.cpp
Outdated
MultiFab** fluxn = fb_fluxn.get(); | ||
MultiFab** fluxnp1 = fb_fluxnp1.get(); | ||
const bool add_old_time_divFlux = true; | ||
Vector<int> diffuse_comp(1); |
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 needs to correspond to the member variable is_diffusive
. We have to allow for the inviscid case. It's length also needs to match the number of components being diffused, as this is going to the general diffuse_scalar
routine.
Hopefully it will default to 1, true, ON, on, yes, YES, !0, or whatever :) |
Yes, the default is to use tensor diffusion.
…On Wed, Feb 9, 2022 at 11:37 AM Marc Day ***@***.***> wrote:
ns.do_tensor_visc is not parsed from inputs. Please add that.
Hopefully it will default to 1, true, ON, on, yes, YES, !0, or whatever :)
—
Reply to this email directly, view it on GitHub
<#116 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACVWVNS33DLN5A6OFKIBUCTU2KJ43ANCNFSM5JKAQTWQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Created a switch,
do_tensor_visc
, that only appliesdiffuse_tensor_velocity()
when the user has tensor viscosity - otherwise,diffuse_scalar()
is used on the velocity components. Saves the computational time of calculating tensor cross terms when you know that they will be zero because of using scalar viscosity (Newtonian fluids).