https://mooseframework.inl.gov
Loading...
Searching...
No Matches
LinearFVPhaseChangeSource.h
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#pragma once
11
13#include "NS.h"
14#include "MooseFunctor.h"
15#include "TimeIntegrator.h"
16
22{
23public:
25
28
29 Real computeMatrixContribution() override;
31
32 virtual void setCurrentElemInfo(const ElemInfo * elem_info) override;
33
34protected:
37
40
43
46
49 const bool _smooth;
50
54
55private:
60 Real computeDfDT(const Real T, const Real T_sol, const Real dT_pc) const;
61
63 std::vector<Real> _factor_history;
64
68 std::vector<Moose::StateArg> _state_args;
69};
const double T
Finite-volume elemental kernel that adds the apparent heat-capacity phase-change source term: rho * L...
virtual void setCurrentElemInfo(const ElemInfo *elem_info) override
static InputParameters validParams()
std::vector< Moose::StateArg > _state_args
State args, the args which will help us fetch the different states of the material property multiplie...
const Moose::Functor< Real > & _rho
Density.
std::vector< Real > _factor_history
Current and older values of the material property multiplier.
const Moose::Functor< Real > & _T_solidus
Solidus Temperature.
const Moose::Functor< Real > & _T_liquidus
Liquidus Temperature.
const TimeIntegrator & _time_integrator
The time integrator to use in this kernel, will provide information on how many states are required i...
const Moose::Functor< Real > & _L
Latent heat.
const bool _smooth
Whether to use the smoothstep liquid fraction (true, default) or the linear ("sharp") liquid fraction...
Real computeDfDT(const Real T, const Real T_sol, const Real dT_pc) const
Compute df/dT at temperature T for the selected liquid-fraction shape.