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

Fix function-based InflowBC and Outflow postprocessor in PrecursorAction #183

Open
smpark7 opened this issue Feb 4, 2022 · 0 comments · Fixed by arfc/squirrel#12 · May be fixed by #266
Open

Fix function-based InflowBC and Outflow postprocessor in PrecursorAction #183

smpark7 opened this issue Feb 4, 2022 · 0 comments · Fixed by arfc/squirrel#12 · May be fixed by #266

Comments

@smpark7
Copy link
Collaborator

smpark7 commented Feb 4, 2022

Issue

Moltres supports precursor drift with uniform, function-based, or Navier-Stokes coupled velocities.

The current implementation of outlet postprocessors and inlet boundary conditions in PrecursorAction.C with function-based velocities and precursor looping:

  1. does not impose an outlet postprocessor for calculating the precursor concentration at the outlet; and
  2. imposes the wrong type of inlet boundary condition without any velocity values provided.

These errors lead to:

  1. MooseError stating that Reporter name "Outlet_Average_pre1_/value" with type "double" is not declared.; and
  2. homogeneous Dirichlet boundary conditions being imposed on the inlet.

How to reproduce

Issue 1:
Replace the lines 26-28 in $MOLTRES/tests/pre/sub.i:

    u_def = ${flow_velocity}
    v_def = 0
    w_def = 0

with:

    constant_velocity_values = false
    u_func = vel_func
    v_func = 0
    w_func = 0

Add the following code block anywhere outside other input sections:

[Functions]
  [./vel_func]
    type = ParsedFunction
    value = ${flow_velocity}
  []
[]

The velocity function imposes the same constant velocity value as the original input file, but the pre_loop.i test fails due to the erroneous function-based velocity boundary conditions imposed by PrecursorAction.C.

Issue 2:
In addition to the code changes to reproduce Issue 1, replace line 401 in PrecursorAction.C:

  if (getParam<bool>("constant_velocity_values"))

with:

  if (getParam<bool>("constant_velocity_values") || !isParamValid("uvel"))

This step fixes Issue 1 but introduces Issue 2.

How to fix

  1. Fix the outlet postprocessor implementation logic in PrecursorAction.C as suggested above.
  2. Create an inflow boundary condition, similar to PostprocessorInflowBC, for function-based velocities and fix the inlet boundary condition implementation logic in PrecursorAction.C.
  3. Create a test for precursor looping with function-based velocities.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment