Conversation
blaisb
left a comment
There was a problem hiding this comment.
Very nice @Julamipolymtl.
Do you think you could add a trivial application test (e.g. you could take a regular buoyancy cavity test, do it with VOF with the cavity filled with a fluid of a non unit density for example, there does not need to be two fluids).
Could you also add a changelog :)!
|
I am not sure why the marangoni tests are failing, did they have buoyancy in them? I presume so. |
hepap
left a comment
There was a problem hiding this comment.
The implementation looks good!
I also think a new test would be nice to have.
Also, check if the header are up-to-date for the year :)
OresteMarquis
left a comment
There was a problem hiding this comment.
After the change of the variable name, it is good to go for me :)
| for (unsigned int q = 0; q < n_q_points; ++q) | ||
| { | ||
| // Forcing term (gravity) | ||
| const Tensor<1, dim> &force = scratch_data.force[q]; |
There was a problem hiding this comment.
Is the force on the fluid always the gravity in general in Lethe? This is not a super name if its the only source of momentum but it may be changed in another PR. In any case, I would change the variable force in this assembler by gravity since the buoyancy is driven by gravity.
There was a problem hiding this comment.
To my knowledge, this forcing term does not have to necessarily be gravity, it could for example be an external magnetic field's effect on a magnetic fluid. I know I personally am a fan of using a parameter outside its intended use :')
From my understanding, the boussinesq buoyancy force would just modify the effect of any external acceleration field, it just so happens that that acceleration field is most often gravity, but it would apply equally to a magnetic field's acceleration.
Indeed all failing marangoni tests had HT, VOF and buoyancy force enabled. I'm no marangoni expert, but I'm guessing these were temperature dependant buoyancy driven tests which now need to be scaled due to the change in the driving buoyancy term. Since I've never modelled this physisc I'd still like to look into the failing tests before changing the failing outputs. |
|
@Julamipolymtl I would avoid changing the output of the test. Most likely you could rescale the thermal expansion coefficient by 1/density to ensure that the values remain the same as before. |
764df25 to
85d51c9
Compare
ccafffb to
c5ee5b3
Compare
blaisb
left a comment
There was a problem hiding this comment.
Just one question regarding a test and 1-2 typo to fix otherwise this is good to go from my side.
Feel free to ask me on slack if there is anything.
applications_tests/lethe-fluid/gls_vof_buoyant_flow_between_parallel_plates.output
Outdated
Show resolved
Hide resolved
applications_tests/lethe-fluid/gls_vof_buoyant_flow_between_parallel_plates.prm
Show resolved
Hide resolved
|
@Julamipolymtl ping me and the others when you have implemented the change on the interpolation of the buoyancy property. |
|
@blaisb @hepap @OresteMarquis the |
987e624 to
1c17ec3
Compare
blaisb
left a comment
There was a problem hiding this comment.
This will just need a rebase for the changelog. I'll take care of it.
Co-authored-by: Bruno Blais <blais.bruno@gmail.com>
1c17ec3 to
f24cda9
Compare
Description
This PR fixes the boussinesq buoyancy term that was miscalculated in VOF. Contrary to the Navier Stockes equations from the
PSPGSUPGNavierStokesAssemblerCore, when using VOF, the density term appears explicitely in both left and right had sides of the assembly fromGLSNavierStokesVOFAssemblerCore. As such, theBuoyancyAssemblerfrom the base Navier Stockes code did not compute the proper buoyancy term.This was made apparent when I used both heat transfert and VOF for a fun lava-lamp model and found that the thermal coefficient value had to be multiplied by approximately the density value for the boussinesq term to take effect.
Solution
Added new buoyancy assembler specific for VOF
navier_stockes_vof_assemblersand changed the setup assembler in bothfluid_dynamic_matrix_basedandfluid_dynamic_blockto compute buoyancy properly. It was found that the product of linearly interpolateddensityandthermal expansion(which is the same as a bilinear interpolation) lead to a non-physical error maximized atphase fraction = 0.5. The product is now evaluated for phase 0 and 1 and linearly interpolated.Testing
New vof buoyancy test added and updated output of failing test that used HT, VOF and the boussinesq buoyancy approximation.
Documentation
No new simulation parameters.
Miscellaneous (will be removed when merged)
Checklist (will be removed when merged)
See this page for more information about the pull request process.
Code related list:
Pull request related list: