AMReX-Fluids / IAMR

A parallel, adaptive mesh refinement (AMR) code that solves the variable-density incompressible Navier-Stokes equations.
https://amrex-fluids.github.io/IAMR/
79 stars 57 forks source link

Scalar vel diff #116

Closed dcoveney closed 1 year ago

dcoveney commented 2 years ago

Created a switch, do_tensor_visc, that only applies diffuse_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).

drummerdoc commented 2 years ago

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).

dcoveney commented 2 years ago

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?

drummerdoc commented 2 years ago

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.

asalmgren commented 2 years ago

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 https://github.com/AMReX-Codes/IAMR/pull/116#issuecomment-985645748, 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.

dcoveney commented 2 years ago

In that case, I should probably set the default do_tensor_visc = 1 since that is the more general (and likely?) case.

cgilet commented 2 years ago

ns.do_tensor_visc is not parsed from inputs. Please add that.

cgilet commented 2 years ago

It would also be good to have a check ensuring that we can only use this with divu=0

drummerdoc commented 2 years ago

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 :)

cgilet commented 2 years ago

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 https://github.com/AMReX-Codes/IAMR/pull/116#issuecomment-1033960008, 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: @.***>