Skip to content

Commit

Permalink
relative diffusive flux correction
Browse files Browse the repository at this point in the history
Former-commit-id: 71e659b
  • Loading branch information
PierreLaurentinCS committed Dec 18, 2023
1 parent 3101563 commit 6ecf9fc
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions source/solvers/navier_stokes_cahn_hilliard_assemblers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,11 @@ GLSNavierStokesCahnHilliardAssemblerCore<dim>::assemble_matrix(
// Calculate the strong residual for GLS stabilization
auto strong_residual =
density_eq * velocity_gradient * velocity + pressure_gradient -
dynamic_viscosity_eq * velocity_laplacian -
dynamic_viscosity_eq * grad_div_velocity - density_eq * force -
relative_diffusive_flux * velocity_gradient -
dynamic_viscosity_eq * velocity_laplacian
//- dynamic_viscosity_eq * grad_div_velocity
- density_eq * force -
velocity_gradient * relative_diffusive_flux - // Multiplier par la gauche le velocity gradient car le gradient
// en deal.ii correspond au gradient mathematique
curvature_cahn_hilliard * potential_value * phase_order_gradient +
strong_residual_vec[q];

Expand Down Expand Up @@ -182,7 +184,7 @@ GLSNavierStokesCahnHilliardAssemblerCore<dim>::assemble_matrix(
// Continuity terms
phi_p_i * div_phi_u_j
// Relative diffusive flux term
- relative_diffusive_flux * grad_phi_u_j * phi_u_i;
- grad_phi_u_j * relative_diffusive_flux * phi_u_i;

// PSPG GLS Term
local_matrix_ij += tau / density_eq * (strong_jac * grad_phi_p_i);
Expand Down Expand Up @@ -311,9 +313,10 @@ GLSNavierStokesCahnHilliardAssemblerCore<dim>::assemble_rhs(

auto strong_residual =
density_eq * velocity_gradient * velocity + pressure_gradient -
dynamic_viscosity_eq * velocity_laplacian -
dynamic_viscosity_eq * grad_div_velocity - density_eq * force -
relative_diffusive_flux * velocity_gradient -
dynamic_viscosity_eq * velocity_laplacian
//- dynamic_viscosity_eq * grad_div_velocity
- density_eq * force -
velocity_gradient * relative_diffusive_flux -
curvature_cahn_hilliard * potential_value * phase_order_gradient +
strong_residual_vec[q];

Expand All @@ -338,7 +341,7 @@ GLSNavierStokesCahnHilliardAssemblerCore<dim>::assemble_rhs(
// Continuity equation
- velocity_divergence * phi_p_i
// Relative diffusive flux term (Cahn-Hilliard)
+ relative_diffusive_flux * velocity_gradient * phi_u_i
+ velocity_gradient * relative_diffusive_flux * phi_u_i
// Surface tension term (Cahn-Hilliard)
+ curvature_cahn_hilliard * potential_value *
phase_order_gradient * phi_u_i) *
Expand Down

0 comments on commit 6ecf9fc

Please sign in to comment.