-
Notifications
You must be signed in to change notification settings - Fork 60
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
Isothermal compressible NS assembler #815
Conversation
c941844
to
0ec7197
Compare
712e481
to
cad9018
Compare
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 will finish tomorrow, I still have to check the isothermal_compressible_navier_stokes_assembler.cc
\\ | ||
& + \sum_{k} \int_{\Omega_k} \left( \partial_t u_k + u_l \partial_l u_k + \partial_k p - \nu \partial_l \partial_l u_k - f_k \right) \cdot \left(\tau_{GLS} \nu \partial_l \partial_l v_k \right) \mathrm{d}\Omega_k | ||
& - \sum_{k} \int_{\Omega_k} \left( \partial_t u_k + u_l \partial_l u_k + \partial_k p - \nu \partial_l \partial_l u_k - f_k \right) \cdot \left(\tau_{GLS} \nu \partial_l \partial_l v_k \right) \mathrm{d}\Omega_k |
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 am not sure of the sign, but in Laura's proposal, it is +, and in lethe it seems to be -
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 based the modification on what was implemented in Lethe; I did ask @blaisb if it was supposed to be a minus, but I'll let him comment on it again here just to make sure that everything is good :)
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.
As far as I know this should be a plus. I guess since it is implemented with a minus we should change the sign in the documentation for now. Let's discuss this afterwards with @blaisb.
include/solvers/isothermal_compressible_navier_stokes_assembler.h
Outdated
Show resolved
Hide resolved
07c55ef
to
b5f92b6
Compare
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 checked everything now! I don't have more comment at the moment, but I will redo the weak formualtion (just to be sure I understand well hehe :D)
7534662
to
9604b31
Compare
69c7197
to
adfa444
Compare
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.
Excellent work, I have got nothing to say except for some typos
applications_tests/gls_navier_stokes_2d/mms2d_isothermal_compressible_ns_gls.prm
Show resolved
Hide resolved
applications_tests/gls_navier_stokes_2d/mms2d_isothermal_compressible_ns_gls.prm
Show resolved
Hide resolved
applications_tests/gls_navier_stokes_2d/mms2d_isothermal_compressible_ns_gls.prm
Outdated
Show resolved
Hide resolved
applications_tests/gls_navier_stokes_2d/mms2d_isothermal_compressible_ns_gls.prm
Outdated
Show resolved
Hide resolved
applications_tests/gls_navier_stokes_2d/mms2d_isothermal_compressible_ns_gls.prm
Outdated
Show resolved
Hide resolved
applications_tests/gls_navier_stokes_2d/mms2d_isothermal_compressible_ns_gls.prm
Outdated
Show resolved
Hide resolved
applications_tests/gls_navier_stokes_2d/mms2d_isothermal_compressible_ns_gls.prm
Outdated
Show resolved
Hide resolved
applications_tests/gls_navier_stokes_3d/mms3d_isothermal_compressible_ns_gls.prm
Show resolved
Hide resolved
2a5152c
to
a8c660f
Compare
a8c660f
to
209fd95
Compare
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.
Good job! Looking forward to the next PR related to this solver.
|
||
|
||
In Lethe, instead of solving for pressure directly, we solve for a reduced pressure :math:`p^*=\frac{p}{\rho}`. This has two advantages, first the scaling of the pressure is more adequate with respect to that of the velocity and, secondly, for single phase simulations, this means that we require a single physical property: the kinematic viscosity. Consequently, unless specified otherwise, you should assume that pressure actually refers to the reduced pressure :math:`p^*`. Although it may seem confusing at first, this is standard in incompressible fluid dynamics. | ||
In Lethe, instead of solving for pressure directly, we solve for a reduced pressure :math:`p=\frac{p^*}{\rho}`. This has two advantages, first the scaling of the pressure is more adequate with respect to that of the velocity and, secondly, for single phase simulations, this means that we require a single physical property: the kinematic viscosity. Consequently, unless specified otherwise, you should assume that pressure actually refers to the reduced pressure :math:`p`. Although it may seem confusing at first, this is standard in incompressible fluid dynamics. |
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 am not sure about this change of notation here, since in literature the reduced pressure is always noted as p*.
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 in fact confusing, I'll add a note to specify that this choice was made to lighten the writing in the documentation :)
\\ | ||
& + \sum_{k} \int_{\Omega_k} \left( \partial_t u_k + u_l \partial_l u_k + \partial_k p - \nu \partial_l \partial_l u_k - f_k \right) \cdot \left(\tau_{GLS} \nu \partial_l \partial_l v_k \right) \mathrm{d}\Omega_k | ||
& - \sum_{k} \int_{\Omega_k} \left( \partial_t u_k + u_l \partial_l u_k + \partial_k p - \nu \partial_l \partial_l u_k - f_k \right) \cdot \left(\tau_{GLS} \nu \partial_l \partial_l v_k \right) \mathrm{d}\Omega_k |
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.
As far as I know this should be a plus. I guess since it is implemented with a minus we should change the sign in the documentation for now. Let's discuss this afterwards with @blaisb.
8053009
to
1afb412
Compare
Co-authored-by: hepap <[email protected]>
Co-authored-by: hepap <[email protected]>
Co-authored-by: PierreLaurentinCS <[email protected]>
This reverts commit 1afb412.
4dcd573
to
1aaeec5
Compare
1aaeec5
to
db2cd26
Compare
Description of the problem When experimenting with the dam break with an obstacle example, it was noticed that the software performed poorly in mimicking the wave's natural shape after the impact. It was assumed that this is due to the lack of considering the air's natural compressibility. Description of the solution In an attempt to solve this issue, an isothermal compressible fluid dynamics Volume of Fluid (VOF) model will be implemented. In a previous PR, an isothermal ideal gas density model was implemented. As a second step, an isothermal compressible formulation of the Navier-Stokes (NS) equations is implemented. Only the continuity equation was adapted to take account of compressibility. How Has This Been Tested? Two tests were added: applications_tests/gls_navier_stokes_2d/mms2d_isothermal_compressible_ns_gls.prm applications_tests/gls_navier_stokes_3d/mms3d_isothermal_compressible_ns_gls.prm The restart_01 unit test was updated so that the fluid's density model is set to constant so that it uses the incompressible NS assemblers: /tests/solvers/restart_01.cc Documentation Documentation was updated: doc/source/parameters/cfd/physical_properties.rst Future changes Currently, in two phase flow simulations, the isothermal ideal gas density model can only be used in conjunction with the incompressible NS equations. However, it is meant to be used with the isothermal formulation of compressible NS equations to account for weakly compressible flows. In a future update, this change will be implemented. At the moment, in the momentum equation, the\nabla \cdot (\nabla \mathbf{u})^T term is neglected, however this might be an inappropriate simplification, since in the compressible form, \nabla \mathbf{u} is not necessarily equal to 0. This will be investigated in a future PR and changes will be implemented if it is evaluated necessary. Comments Small corrections where made to the fluid dynamics theory: doc/source/theory/fluid_dynamics/fem_formulation.rst doc/source/theory/fluid_dynamics/navier-stokes.rst doc/source/theory/fluid_dynamics/stabilization.rst --------- Co-authored-by: hepap <[email protected]> Co-authored-by: PierreLaurentinCS <[email protected]> Former-commit-id: 73a4237
Description of the problem When experimenting with the dam break with an obstacle example, it was noticed that the software performed poorly in mimicking the wave's natural shape after the impact. It was assumed that this is due to the lack of considering the air's natural compressibility. Description of the solution In an attempt to solve this issue, an isothermal compressible fluid dynamics Volume of Fluid (VOF) model will be implemented. In a previous PR, an isothermal ideal gas density model was implemented. As a second step, an isothermal compressible formulation of the Navier-Stokes (NS) equations is implemented. Only the continuity equation was adapted to take account of compressibility. How Has This Been Tested? Two tests were added: applications_tests/gls_navier_stokes_2d/mms2d_isothermal_compressible_ns_gls.prm applications_tests/gls_navier_stokes_3d/mms3d_isothermal_compressible_ns_gls.prm The restart_01 unit test was updated so that the fluid's density model is set to constant so that it uses the incompressible NS assemblers: /tests/solvers/restart_01.cc Documentation Documentation was updated: doc/source/parameters/cfd/physical_properties.rst Future changes Currently, in two phase flow simulations, the isothermal ideal gas density model can only be used in conjunction with the incompressible NS equations. However, it is meant to be used with the isothermal formulation of compressible NS equations to account for weakly compressible flows. In a future update, this change will be implemented. At the moment, in the momentum equation, the\nabla \cdot (\nabla \mathbf{u})^T term is neglected, however this might be an inappropriate simplification, since in the compressible form, \nabla \mathbf{u} is not necessarily equal to 0. This will be investigated in a future PR and changes will be implemented if it is evaluated necessary. Comments Small corrections where made to the fluid dynamics theory: doc/source/theory/fluid_dynamics/fem_formulation.rst doc/source/theory/fluid_dynamics/navier-stokes.rst doc/source/theory/fluid_dynamics/stabilization.rst --------- Co-authored-by: hepap <[email protected]> Co-authored-by: PierreLaurentinCS <[email protected]> Former-commit-id: 73a4237
Description of the problem
Description of the solution
How Has This Been Tested?
Two tests were added:
applications_tests/gls_navier_stokes_2d/mms2d_isothermal_compressible_ns_gls.prm
applications_tests/gls_navier_stokes_3d/mms3d_isothermal_compressible_ns_gls.prm
The restart_01 unit test was updated so that the fluid's density model is set to
constant
so that it uses the incompressible NS assemblers:/tests/solvers/restart_01.cc
Documentation
Documentation was updated
doc/source/parameters/cfd/physical_properties.rst
Future changes
\nabla \cdot (\nabla \mathbf{u})^T
term is neglected, however this might be an inappropriate simplification, since in the compressible form,\nabla \mathbf{u}
is not necessarily equal to 0. This will be investigated in a future PR and changes will be implemented if it is evaluated necessary.Comments
Small corrections where made to the fluid dynamics theory:
doc/source/theory/fluid_dynamics/fem_formulation.rst
doc/source/theory/fluid_dynamics/navier-stokes.rst
doc/source/theory/fluid_dynamics/stabilization.rst