-
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
Add missing VOF term in the strong form of the residual #1149
Conversation
@@ -143,7 +157,7 @@ GLSNavierStokesVOFAssemblerCore<dim>::assemble_matrix( | |||
const auto &phi_u_j = scratch_data.phi_u[q][j]; | |||
const auto &grad_phi_u_j = scratch_data.grad_phi_u[q][j]; | |||
const auto &div_phi_u_j = scratch_data.div_phi_u[q][j]; | |||
const auto &shear_rate_j = grad_phi_u_j + transpose(grad_phi_u_j); | |||
const auto shear_rate_j = grad_phi_u_j + transpose(grad_phi_u_j); |
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 should not have been a reference, so this was a bit weird.
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.
Funny that it was not thought of before! I only found a small typo to fix :)
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 have only a small comment. These equations are not in the documentation, am I correct? I guess we should be writing these equations there soon in a "multiphysics coupling" section...
@@ -90,12 +94,22 @@ GLSNavierStokesVOFAssemblerCore<dim>::assemble_matrix( | |||
calculate_navier_stokes_gls_tau_transient( | |||
u_mag, viscosity_for_stabilization_vector[q] / density_eq, h, sdt); | |||
|
|||
// Void fraction gradient for strong residual |
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.
// Void fraction gradient for strong residual | |
// Filtered phase fraction gradient for strong residual |
@@ -243,6 +256,10 @@ GLSNavierStokesVOFAssemblerCore<dim>::assemble_rhs( | |||
const Tensor<1, dim> pressure_gradient = | |||
scratch_data.pressure_gradients[q]; | |||
|
|||
// Void fraction gradient for strong residual |
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.
// Void fraction gradient for strong residual | |
// Filtered phase fraction gradient for strong residual |
@@ -909,12 +932,22 @@ GLSNavierStokesVOFAssemblerNonNewtonianCore<dim>::assemble_matrix( | |||
calculate_navier_stokes_gls_tau_transient( | |||
u_mag, viscosity_for_stabilization_vector[q] / density_eq, h, sdt); | |||
|
|||
// Void fraction gradient for strong residual |
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.
// Void fraction gradient for strong residual | |
// Filtered phase fraction gradient for strong residual |
@@ -1107,12 +1140,22 @@ GLSNavierStokesVOFAssemblerNonNewtonianCore<dim>::assemble_rhs( | |||
u_mag, viscosity_for_stabilization_vector[q] / density_eq, h, sdt); | |||
|
|||
|
|||
// Void fraction gradient for strong residual |
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.
// Void fraction gradient for strong residual | |
// Filtered phase fraction gradient for strong residual |
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.
Nothing to say, everything is clean, but I'd like this question answered before merging :
Why don't we add the term also in the strong jacobian ?
time x_vof y_vof vx_vof vy_vof | ||
1.000000 0.513510 0.638807 0.449408 -0.013436 | ||
time x_vof y_vof vx_vof vy_vof | ||
1.000000 0.512900 0.576332 0.363353 0.013339 |
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.
Maybe it's because this test case is weird, but the differences are more significant here.
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.
Yeah I was wondering this also. I'm not exactly sure what's up. I'll double check.
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.
Yeah that test is weird as fuck, I'm not surpirsed the results changed that much, the test has not real physical meaning it's just there to see if the boundary change in time. No alarm to be had.
Good question. The strong Jacobian term is very expensive to calculate since it has the full hessian. I checked many cases and it never really affects convergence, so for now we can neglect it i think. |
Co-authored-by: Amishga Alphonius <[email protected]>
Description The term associated with the viscosity jump in the strong residual for the NS-VOF assembler added in PR Add missing VOF term in the strong form of the residual #1149 led to a ill-posed formulation in phase change cases where the solid is represented by a highly viscous fluid. Hence, we don't consider this term in the current formulation. There was no appropriate application test for lpbf/phase change with vof cases that could have allowed us to identify this ill-posed formulation prior to the merge of PR Add missing VOF term in the strong form of the residual #1149. The LPBF benchmark example prm files were almost up to date, but did not exactly matched the one we used to generate the benchmark results. The mesh files were missing from the repo. Solution This PR removes the term associated with the viscosity jump. A new test is now included to avoid future mistake in lpbf/phase change with vof cases. LPBF benchmark example prm files were modified and are now up to date with the current working version. The mesh files are now available in the repo. Testing The new test simulate the lpbf benchmark case using the extra-extra-coarse mesh. Temperature statistics and mass conservation monitoring are the outputted metrics (to track both the change in HT and NS-VOF solvers). Other NS-VOF tests were updated, and results for those tests returned to their previous values (or almost with small differences). Documentation No modification in the documentation. Co-authored-by: Amishga Alphonius <[email protected]>
…l#1149) Description of the problem There was a missing term in the strong form of the residual which is (mu_1 - mu_0) * (grad_u + grad_u^T) * grad_phase This does not have significant consequences, but I think it is best to remain consistent Description of the solution Add missing term How Has This Been Tested? All test results barely change, but I had to update them nonetheless It seems to help a little bit in terms of velocity divergence, but really not much to be honest. Co-authored-by: Amishga Alphonius <[email protected]> Former-commit-id: 8e1ec70
Description The term associated with the viscosity jump in the strong residual for the NS-VOF assembler added in PR Add missing VOF term in the strong form of the residual chaos-polymtl#1149 led to a ill-posed formulation in phase change cases where the solid is represented by a highly viscous fluid. Hence, we don't consider this term in the current formulation. There was no appropriate application test for lpbf/phase change with vof cases that could have allowed us to identify this ill-posed formulation prior to the merge of PR Add missing VOF term in the strong form of the residual chaos-polymtl#1149. The LPBF benchmark example prm files were almost up to date, but did not exactly matched the one we used to generate the benchmark results. The mesh files were missing from the repo. Solution This PR removes the term associated with the viscosity jump. A new test is now included to avoid future mistake in lpbf/phase change with vof cases. LPBF benchmark example prm files were modified and are now up to date with the current working version. The mesh files are now available in the repo. Testing The new test simulate the lpbf benchmark case using the extra-extra-coarse mesh. Temperature statistics and mass conservation monitoring are the outputted metrics (to track both the change in HT and NS-VOF solvers). Other NS-VOF tests were updated, and results for those tests returned to their previous values (or almost with small differences). Documentation No modification in the documentation. Co-authored-by: Amishga Alphonius <[email protected]> Former-commit-id: b1ec9c1
Description of the problem There was a missing term in the strong form of the residual which is (mu_1 - mu_0) * (grad_u + grad_u^T) * grad_phase This does not have significant consequences, but I think it is best to remain consistent Description of the solution Add missing term How Has This Been Tested? All test results barely change, but I had to update them nonetheless It seems to help a little bit in terms of velocity divergence, but really not much to be honest. Co-authored-by: Amishga Alphonius <[email protected]> Former-commit-id: 8e1ec70
Description The term associated with the viscosity jump in the strong residual for the NS-VOF assembler added in PR Add missing VOF term in the strong form of the residual #1149 led to a ill-posed formulation in phase change cases where the solid is represented by a highly viscous fluid. Hence, we don't consider this term in the current formulation. There was no appropriate application test for lpbf/phase change with vof cases that could have allowed us to identify this ill-posed formulation prior to the merge of PR Add missing VOF term in the strong form of the residual #1149. The LPBF benchmark example prm files were almost up to date, but did not exactly matched the one we used to generate the benchmark results. The mesh files were missing from the repo. Solution This PR removes the term associated with the viscosity jump. A new test is now included to avoid future mistake in lpbf/phase change with vof cases. LPBF benchmark example prm files were modified and are now up to date with the current working version. The mesh files are now available in the repo. Testing The new test simulate the lpbf benchmark case using the extra-extra-coarse mesh. Temperature statistics and mass conservation monitoring are the outputted metrics (to track both the change in HT and NS-VOF solvers). Other NS-VOF tests were updated, and results for those tests returned to their previous values (or almost with small differences). Documentation No modification in the documentation. Co-authored-by: Amishga Alphonius <[email protected]> Former-commit-id: b1ec9c1
Description of the problem
Description of the solution
How Has This Been Tested?