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

Fixes PrecursorAction with velocity functions, and supports higher order precursor variable initialization #266

Open
wants to merge 6 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions include/actions/PrecursorAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ class PrecursorAction : public VariableNotAMooseObjectAction
*/
void addTimeDerivative(const std::string & var_name);

/**
* Adds appropriate conservative advection kernel
*
* @param var_name The name of the variable the kernel acts on
*/
void addAdvection(const std::string & var_name);

/**
* Adds DGAdvection kernel
*
Expand All @@ -72,6 +79,11 @@ class PrecursorAction : public VariableNotAMooseObjectAction
*/
void addInflowBC(const std::string & var_name);

/**
* Adds a PostprocessorPenaltyDirichletBC to stabilize precursor conc at inlet
*/
void addPenaltyBC(const std::string & var_name);

/**
* Adds random initial conditions for Jacobian testing
*
Expand Down Expand Up @@ -127,5 +139,9 @@ class PrecursorAction : public VariableNotAMooseObjectAction
/// optional object name suffix
std::string _object_suffix;

/// whether input file is for the outer loop
bool _is_loopapp;

/// velocity type
MooseEnum _velocity_type;
};
21 changes: 21 additions & 0 deletions include/postprocessors/SideFunctionWeightedIntegralPostprocessor.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#pragma once

#include "SideIntegralVariablePostprocessor.h"

/**
* This postprocessor computes the weighted integral of a
* variable along a boundary, weighted by the user-provided function.
*/
class SideFunctionWeightedIntegralPostprocessor : public SideIntegralVariablePostprocessor
{
public:
SideFunctionWeightedIntegralPostprocessor(const InputParameters & parameters);

static InputParameters validParams();

protected:
virtual Real computeQpIntegral() override;

// Weight function
const Function & _weight_func;
};
2 changes: 1 addition & 1 deletion moose
Submodule moose updated 3215 files
2 changes: 1 addition & 1 deletion problems/2021-cnrs-benchmark/phase-0/nts.i
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
[pres]
var_name_base = pre
outlet_boundaries = ''
constant_velocity_values = true
velocity_type = constant
u_def = 0
v_def = 0
w_def = 0
Expand Down
4 changes: 2 additions & 2 deletions problems/2021-cnrs-benchmark/phase-0/tests
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Tests]
[vel_field_syntax]
type = RunApp
input = nts.i
input = vel-field.i
check_input = True
method = opt
[]
Expand All @@ -13,7 +13,7 @@
[]
[temperature_syntax]
type = RunApp
input = nts.i
input = temperature.i
check_input = True
method = opt
[]
Expand Down
2 changes: 1 addition & 1 deletion problems/2021-cnrs-benchmark/phase-1/buoyancy-nts.i
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
[pres]
var_name_base = pre
outlet_boundaries = ''
constant_velocity_values = false
velocity_type = variable
uvel = vel_x
vvel = vel_y
nt_exp_form = false
Expand Down
2 changes: 1 addition & 1 deletion problems/2021-cnrs-benchmark/phase-1/circ-fuel.i
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
[pres]
var_name_base = pre
outlet_boundaries = ''
constant_velocity_values = false
velocity_type = variable
uvel = ux
vvel = uy
nt_exp_form = false
Expand Down
2 changes: 1 addition & 1 deletion problems/2021-cnrs-benchmark/phase-1/full-coupling-nts.i
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
[pres]
var_name_base = pre
outlet_boundaries = ''
constant_velocity_values = false
velocity_type = variable
uvel = vel_x
vvel = vel_y
nt_exp_form = false
Expand Down
2 changes: 1 addition & 1 deletion problems/2021-cnrs-benchmark/phase-1/power-coupling-nts.i
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
[pres]
var_name_base = pre
outlet_boundaries = ''
constant_velocity_values = false
velocity_type = variable
uvel = ux
vvel = uy
nt_exp_form = false
Expand Down
5 changes: 3 additions & 2 deletions problems/2021-cnrs-benchmark/phase-2/transient.i
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ dt = 0.00625 # Timestep size = 1 / freq / 200 = 0.00625 s

[Problem]
type = FEProblem
allow_initial_conditions_with_restart = true
[]

[Variables]
Expand Down Expand Up @@ -69,7 +70,7 @@ dt = 0.00625 # Timestep size = 1 / freq / 200 = 0.00625 s
[pres]
var_name_base = pre
outlet_boundaries = ''
constant_velocity_values = false
velocity_type = variable
uvel = velx
vvel = vely
nt_exp_form = false
Expand Down Expand Up @@ -214,7 +215,7 @@ dt = 0.00625 # Timestep size = 1 / freq / 200 = 0.00625 s
[Functions]
[func_alpha]
type = ParsedFunction
value = '1 + 0.1 * sin(2*pi*t*${freq})' # Perturbation frequency = 0.8Hz
expression = '1 + 0.1 * sin(2*pi*t*${freq})' # Perturbation frequency = 0.8Hz
[]
[velxf]
type = SolutionFunction
Expand Down
Loading