https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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
37void
registerMooseObject("NavierStokesApp", SoundspeedMat)
unsigned int _qp
static InputParameters validParams()
Common class for single phase fluid properties.
Computes the speed of sound from other Navier-Stokes material properties.
const ADMaterialProperty< Real > & _temperature
temperature
static InputParameters validParams()
const SinglePhaseFluidProperties & _fluid
fluid properties user object
const ADMaterialProperty< Real > & _pressure
pressure
SoundspeedMat(const InputParameters &parameters)
ADMaterialProperty< Real > & _sound_speed
The speed of sound.
virtual void computeQpProperties() override
static const std::string fluid
Definition NS.h:88