Skip to content
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

Improve limiters for incompressible and weakly-compressible flow #28891

Open
tanoret opened this issue Oct 19, 2024 · 0 comments · May be fixed by #28892
Open

Improve limiters for incompressible and weakly-compressible flow #28891

tanoret opened this issue Oct 19, 2024 · 0 comments · May be fixed by #28892
Labels
T: task An enhancement to the software.

Comments

@tanoret
Copy link
Contributor

tanoret commented Oct 19, 2024

Motivation

Current slope limiters have issues converging for incompressible and weakly compressible flow. Formulation should be revised and improved for incompressible and weakly-compressible flow.

Dispersion test case (adection of a scalar at 45 degrees)

diff = 1e-12
advected_interp_method = 'vanLeer' #average upwind sou min_mod vanLeer quick venkatakrishnan skewness-corrected
velocity_interp_method = 'average'

[UserObjects]
  [rc]
    type = INSFVRhieChowInterpolator
    u = vel_x
    v = vel_y
    a_u = vel_x
    a_v = vel_y
    pressure = pressure
  []
[]

[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 1
    ymin = 0
    ymax = 1
    nx = 50
    ny = 50
  []
[]

[AuxVariables]
  [vel_x]
    type = INSFVVelocityVariable
    initial_condition = 1.0
  []
  [vel_y]
    type = INSFVVelocityVariable
    initial_condition = 1.0
  []
  [pressure]
    type = INSFVPressureVariable
    initial_condition = 1.0
  []
[]

[Variables]
  [scalar]
    type = INSFVScalarFieldVariable
  []
[]

[FVKernels]
  [scalar_time]
    type = FVFunctorTimeKernel
    variable = scalar
  []
  [scalar_advection]
    type = INSFVScalarFieldAdvection
    variable = scalar
    velocity_interp_method = ${velocity_interp_method}
    advected_interp_method = ${advected_interp_method}
    rhie_chow_user_object = 'rc'
  []
  [scalar_diffusion]
    type = FVDiffusion
    coeff = ${diff}
    variable = scalar
  []
[]

[FVBCs]
  [fv_inflow]
    type = NSFVOutflowTemperatureBC
    u = vel_x
    v = vel_y
    backflow_T = 1.0
    rho = 1.0
    cp = 1.0
    variable = scalar
    boundary = 'left'
  []
  [fv_outflow]
    type = NSFVOutflowTemperatureBC
    u = vel_x
    v = vel_y
    backflow_T = 0.0
    rho = 1.0
    cp = 1.0
    variable = scalar
    boundary = 'right top bottom'
  []
[]

[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -pc_factor_shift_type'
  petsc_options_value = 'lu NONZERO'
  [TimeStepper]
    type = IterationAdaptiveDT
    optimal_iterations = 20
    linear_iteration_ratio = 2
    dt = 0.1
  []
  nl_abs_tol = 1e-10
[]

[Outputs]
  exodus = true
  csv = true
[]

Expected results: similar results in OpenFOAM

Design

For second order upwind, we suggest implementing the standard formulation as folllows:

$$\phi_f = \phi_C + \alpha ((\nabla \phi)_C \cdot dCF)$$

where $\alpha$ is the parameter computed by the limiter.

Impact

These modifications could allow the usage of second order upwind for the finite volume formulation.

@tanoret tanoret added the T: task An enhancement to the software. label Oct 19, 2024
tanoret pushed a commit to tanoret/moose that referenced this issue Oct 19, 2024
@tanoret tanoret linked a pull request Oct 19, 2024 that will close this issue
tanoret pushed a commit to tanoret/moose that referenced this issue Oct 20, 2024
tanoret pushed a commit to tanoret/moose that referenced this issue Oct 24, 2024
tanoret added a commit to tanoret/moose that referenced this issue Oct 24, 2024
tanoret added a commit to tanoret/moose that referenced this issue Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: task An enhancement to the software.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant