-
Notifications
You must be signed in to change notification settings - Fork 63
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
Cahn-Hilliard-Navier-Stokes #1013
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.
FIrst batch of comments. Could you please add within the example folder the CHN examples you have, even if they are not documented, this way we can start keeping track of them. At least static bubble and rising bubble.
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.
Great job @PierreLaurentinCS!!! It is nice to see everything coming together after so many months of hard work!!
I haven't finished my review. I'll look at the assemblers on Monday when I'll have the equations :)
applications_tests/lethe-fluid/cahn_hilliard_navier_stokes_coupling.prm
Outdated
Show resolved
Hide resolved
applications_tests/lethe-fluid/cahn_hilliard_navier_stokes_coupling.prm
Outdated
Show resolved
Hide resolved
applications_tests/lethe-fluid/cahn_hilliard_navier_stokes_coupling.prm
Outdated
Show resolved
Hide resolved
if (this->simulation_parameters.multiphysics.cahn_hilliard) | ||
{ | ||
this->pcout << "L2 error pressure : " | ||
<< std::setprecision( | ||
simulation_control->get_log_precision()) | ||
<< error_pressure << 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.
Why is the pressure L2 error norm only displayed for CH?
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 thought, since it was not implemented before that there was a specific reason for it, so I left it only for the Cahn-Hilliard simulations
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.
The issue is that for the VOF solver the pressure is sometimes erratic (it will translate by a constant) so generally pressure in VOF is not a very portable variable. I'M not sure if it's a good idea to enable it in a test. We can try and if it is portable we will keep it, if no, we can remove it 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.
The problem is the same with CHNS, the pressure is correct up to a constant (but the pressure jump is the Laplace pressure jump). Agreed on the future removal if it's not portable enough, I'll keep it this way (compute pressure error for vof OR chns) for the moment
95414e6
to
d336c0b
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.
Moar comments
examples/multiphysics/rising-bubble-chns/rising-bubble-chns.prm
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.
A little bit moar.
if (this->simulation_parameters.multiphysics.cahn_hilliard) | ||
{ | ||
this->pcout << "L2 error pressure : " | ||
<< std::setprecision( | ||
simulation_control->get_log_precision()) | ||
<< error_pressure << 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.
The issue is that for the VOF solver the pressure is sometimes erratic (it will translate by a constant) so generally pressure in VOF is not a very portable variable. I'M not sure if it's a good idea to enable it in a test. We can try and if it is portable we will keep it, if no, we can remove it 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.
Only some minor comments :)
Great work again!
examples/multiphysics/rising-bubble-chns/rising-bubble-chns.prm
Outdated
Show resolved
Hide resolved
examples/multiphysics/rising-bubble-chns/rising-bubble-chns.prm
Outdated
Show resolved
Hide resolved
…consistent and consisten SUPG in CH
…ry corrections for epsilon
d336c0b
to
7d1680f
Compare
Description of the problem The last implementation of the Cahn-Hilliard-Navier-Stokes coupled equations were incorrectly reproducing classical test cases such as the rising bubble or the Rayleigh-Taylor instability The problem resided in the formulation of the Cahn-Hilliard equation and also major mistakes in the computation of physical properties in the coupling between Navier-Stokes and Cahn-Hilliard The thought process which eventually led to a change in the initial set of equation led to other additions. Among them : chemical potential smoothing, phase filtering (clipping and tanh) and other minor modifications Description of the solution The Cahn-Hilliard equations were fixed and the use of mobility as physical property made it more readable and compact The coefficients multiplying the energies (bulk and interface) now depend on two parameters : epsilon (proportional to the size of the cell) and lambda which itself depends on the size of the cell and surface tension How Has This Been Tested? All the former tests were fixed to account for the new assembly : mms2d and 3d, cahn-hilliard-navier-stokes coupling, time-dependant boundary condition A new test was added to test the phase filtering Many canonical tests were performed. This should be illustrated soon with examples. Documentation Nothing was changed in the documentation, this will be the work of another PR Future changes During the development a gls stabilization was successfully implemented but it was not kept in this version because of the new assembly. This will be added in a future PR. The fixed angle of contact BC is not functional for extreme angles. New formulations will be tested in future PRs Former-commit-id: fbe87ab
Description of the problem The last implementation of the Cahn-Hilliard-Navier-Stokes coupled equations were incorrectly reproducing classical test cases such as the rising bubble or the Rayleigh-Taylor instability The problem resided in the formulation of the Cahn-Hilliard equation and also major mistakes in the computation of physical properties in the coupling between Navier-Stokes and Cahn-Hilliard The thought process which eventually led to a change in the initial set of equation led to other additions. Among them : chemical potential smoothing, phase filtering (clipping and tanh) and other minor modifications Description of the solution The Cahn-Hilliard equations were fixed and the use of mobility as physical property made it more readable and compact The coefficients multiplying the energies (bulk and interface) now depend on two parameters : epsilon (proportional to the size of the cell) and lambda which itself depends on the size of the cell and surface tension How Has This Been Tested? All the former tests were fixed to account for the new assembly : mms2d and 3d, cahn-hilliard-navier-stokes coupling, time-dependant boundary condition A new test was added to test the phase filtering Many canonical tests were performed. This should be illustrated soon with examples. Documentation Nothing was changed in the documentation, this will be the work of another PR Future changes During the development a gls stabilization was successfully implemented but it was not kept in this version because of the new assembly. This will be added in a future PR. The fixed angle of contact BC is not functional for extreme angles. New formulations will be tested in future PRs Former-commit-id: fbe87ab
Description of the problem
Description of the solution
How Has This Been Tested?
Documentation
Future changes