Skip to content
Permalink
Browse files

Merge pull request #13009 from snschune/move_p_T_aux_to_fp_13008

Move P and TAux from NS to FP module
  • Loading branch information...
andrsd committed Mar 7, 2019
2 parents b6b1089 + 754310f commit 405f084f0cfa6a7b58f3e3c95bce9887b856e406
@@ -0,0 +1,13 @@
# PressureAux

!syntax description /AuxKernels/PressureAux

Calculates the pressure given specific volume and specific internal energy.

!syntax parameters /AuxKernels/PressureAux

!syntax inputs /AuxKernels/PressureAux

!syntax children /AuxKernels/PressureAux

!bibtex bibliography
@@ -0,0 +1,13 @@
# TemperatureAux

!syntax description /AuxKernels/TemperatureAux

Calculates the temperature given specific volume and specific internal energy.

!syntax parameters /AuxKernels/TemperatureAux

!syntax inputs /AuxKernels/TemperatureAux

!syntax children /AuxKernels/TemperatureAux

!bibtex bibliography
@@ -1,12 +1,3 @@
//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html

#ifndef PRESSUREAUX_H
#define PRESSUREAUX_H

@@ -18,6 +9,9 @@ class SinglePhaseFluidProperties;
template <>
InputParameters validParams<PressureAux>();

/**
* Computes pressure from specific volume and specific internal energy
*/
class PressureAux : public AuxKernel
{
public:
@@ -26,8 +20,9 @@ class PressureAux : public AuxKernel
protected:
virtual Real computeValue();

const VariableValue & _s_volume;
const VariableValue & _s_internal_energy;
const VariableValue & _v;
const VariableValue & _e;

const SinglePhaseFluidProperties & _fp;
};

@@ -0,0 +1,29 @@
#ifndef TEMPERATUREAUX_H
#define TEMPERATUREAUX_H

#include "AuxKernel.h"

class TemperatureAux;
class SinglePhaseFluidProperties;

template <>
InputParameters validParams<TemperatureAux>();

/**
* Compute temperature values from specific volume and internal energy
*/
class TemperatureAux : public AuxKernel
{
public:
TemperatureAux(const InputParameters & parameters);

protected:
virtual Real computeValue();

const VariableValue & _v;
const VariableValue & _e;

const SinglePhaseFluidProperties & _fp;
};

#endif /* TEMPERATUREAUX_H */
@@ -0,0 +1,31 @@
#include "PressureAux.h"
#include "SinglePhaseFluidProperties.h"

registerMooseObject("FluidPropertiesApp", PressureAux);

template <>
InputParameters
validParams<PressureAux>()
{
InputParameters params = validParams<AuxKernel>();
params.addRequiredCoupledVar("e", "Specific internal energy");
params.addRequiredCoupledVar("v", "Specific volume");
params.addRequiredParam<UserObjectName>("fp", "The name of the user object for fluid properties");
params.addClassDescription(
"Computes pressure given specific volume and specific internal energy");
return params;
}

PressureAux::PressureAux(const InputParameters & parameters)
: AuxKernel(parameters),
_v(coupledValue("v")),
_e(coupledValue("e")),
_fp(getUserObject<SinglePhaseFluidProperties>("fp"))
{
}

Real
PressureAux::computeValue()
{
return _fp.p_from_v_e(_v[_qp], _e[_qp]);
}
@@ -0,0 +1,31 @@
#include "TemperatureAux.h"
#include "SinglePhaseFluidProperties.h"

registerMooseObject("FluidPropertiesApp", TemperatureAux);

template <>
InputParameters
validParams<TemperatureAux>()
{
InputParameters params = validParams<AuxKernel>();
params.addRequiredCoupledVar("e", "Specific internal energy");
params.addRequiredCoupledVar("v", "Specific volume");
params.addRequiredParam<UserObjectName>("fp", "The name of the user object for fluid properties");
params.addClassDescription(
"Computes temperature given specific volume and specific internal energy");
return params;
}

TemperatureAux::TemperatureAux(const InputParameters & parameters)
: AuxKernel(parameters),
_v(coupledValue("v")),
_e(coupledValue("e")),
_fp(getUserObject<SinglePhaseFluidProperties>("fp"))
{
}

Real
TemperatureAux::computeValue()
{
return _fp.T_from_v_e(_v[_qp], _e[_qp]);
}

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

0 comments on commit 405f084

Please sign in to comment.
You can’t perform that action at this time.