/home/runner/work/amr-wind/amr-wind/amr-wind/turbulence/TurbModel.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/turbulence/TurbModel.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
TurbModel.H
Go to the documentation of this file.
1#ifndef TURBMODEL_H
2#define TURBMODEL_H
3
5#include "amr-wind/CFDSim.H"
6
7namespace amr_wind::turbulence {
8
16template <typename Transport>
18{
19public:
20 using TransportType = Transport;
21
22 explicit TurbModel(CFDSim& sim) : m_sim(sim), m_transport(sim) {}
23
25
27 {
29 }
30
32 std::unique_ptr<ScratchField> mu() override { return m_transport.mu(); }
33
35 std::unique_ptr<ScratchField> alpha() override
36 {
37 return m_transport.alpha();
38 }
39
41 std::unique_ptr<ScratchField>
42 scalar_diffusivity(const std::string& name) override
43 {
44 return m_transport.scalar_diffusivity(name);
45 }
46
47 Field& mueff() override
48 {
49 AMREX_ASSERT(m_mueff != nullptr);
50 return *m_mueff;
51 }
52
53 Field& alphaeff() override
54 {
55 AMREX_ASSERT(m_alphaeff != nullptr);
56 return *m_alphaeff;
57 }
58
59protected:
61
63 Transport m_transport;
64
66 Field* m_mueff{nullptr};
67
69 Field* m_alphaeff{nullptr};
70};
71
72} // namespace amr_wind::turbulence
73
74#endif /* TURBMODEL_H */
Definition CFDSim.H:47
Definition Field.H:116
Definition TurbModel.H:18
std::unique_ptr< ScratchField > alpha() override
Return the thermal diffusivity field.
Definition TurbModel.H:35
Field * m_alphaeff
Reference to the thermal diffusivity field.
Definition TurbModel.H:69
std::unique_ptr< ScratchField > mu() override
Return the dynamic viscosity field.
Definition TurbModel.H:32
void register_alphaeff_field(Field &alphaeff) override
Register the thermal diffusivity field.
Definition TurbModel.H:26
CFDSim & m_sim
Definition TurbModel.H:60
Field & mueff() override
Return the effective dynamic viscosity field.
Definition TurbModel.H:47
TurbModel(CFDSim &sim)
Definition TurbModel.H:22
void register_mueff_field(Field &mueff) override
Register the effective viscosity (for momentum field)
Definition TurbModel.H:24
Field * m_mueff
Reference to the effective viscosity field.
Definition TurbModel.H:66
Transport TransportType
Definition TurbModel.H:20
std::unique_ptr< ScratchField > scalar_diffusivity(const std::string &name) override
Return the scalar diffusivity field.
Definition TurbModel.H:42
Field & alphaeff() override
Return the effective thermal diffusivity field.
Definition TurbModel.H:53
Transport m_transport
Transport properties instance.
Definition TurbModel.H:63
Definition TurbulenceModel.H:32
Definition CFDSim.H:23