https://mooseframework.inl.gov
SoundspeedMat.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 // Navier-Stokes includes
11 #include "SoundspeedMat.h"
12 #include "NS.h"
13 
14 // FluidProperties includes
16 
17 registerMooseObject("NavierStokesApp", SoundspeedMat);
18 
21 {
22  auto params = Material::validParams();
23  params.addRequiredParam<UserObjectName>(NS::fluid, "fluid userobject");
24  params.addClassDescription("Computes the speed of sound");
25  return params;
26 }
27 
29  : Material(parameters),
30  _sound_speed(declareADProperty<Real>(NS::sound_speed)),
31  _pressure(getADMaterialProperty<Real>(NS::pressure)),
32  _temperature(getADMaterialProperty<Real>(NS::T_fluid)),
33  _fluid(getUserObject<SinglePhaseFluidProperties>(NS::fluid))
34 {
35 }
36 
37 void
39 {
41 }
const ADMaterialProperty< Real > & _temperature
temperature
Definition: SoundspeedMat.h:36
static const std::string fluid
Definition: NS.h:87
virtual void computeQpProperties() override
Definition: SoundspeedMat.C:38
const ADMaterialProperty< Real > & _pressure
pressure
Definition: SoundspeedMat.h:33
unsigned int _qp
static const std::string T_fluid
Definition: NS.h:106
static InputParameters validParams()
registerMooseObject("NavierStokesApp", SoundspeedMat)
ADMaterialProperty< Real > & _sound_speed
The speed of sound.
Definition: SoundspeedMat.h:30
static const std::string sound_speed
Definition: NS.h:144
static InputParameters validParams()
Definition: SoundspeedMat.C:20
Common class for single phase fluid properties.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string pressure
Definition: NS.h:56
Computes the speed of sound from other Navier-Stokes material properties.
Definition: SoundspeedMat.h:19
const SinglePhaseFluidProperties & _fluid
fluid properties user object
Definition: SoundspeedMat.h:39
SoundspeedMat(const InputParameters &parameters)
Definition: SoundspeedMat.C:28