/home/runner/work/amr-wind/amr-wind/amr-wind/CFDSim.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/CFDSim.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
CFDSim.H
Go to the documentation of this file.
1#ifndef CFDSIM_H
2#define CFDSIM_H
3
4#include "AMReX_AmrCore.H"
10#include "amr-wind/helics.H"
11
16namespace amr_wind {
17class IOManager;
18class PostProcessManager;
19class OversetManager;
20class ExtSolverMgr;
21class HelicsStorage;
22
23namespace turbulence {
24class TurbulenceModel;
25}
26
46class CFDSim
47{
48public:
49 explicit CFDSim(amrex::AmrCore& mesh);
50
52
54 amrex::AmrCore& mesh() { return m_mesh; }
55 const amrex::AmrCore& mesh() const { return m_mesh; }
56
58 SimTime& time() { return m_time; }
59 const SimTime& time() const { return m_time; }
60
62 FieldRepo& repo() { return m_repo; }
63 FieldRepo& repo() const { return m_repo; }
64
66 const pde::PDEMgr& pde_manager() const { return m_pde_mgr; }
67
69 const PhysicsMgr& physics_manager() const { return m_physics_mgr; }
70
73 {
74 return m_physics_mgr.objects();
75 }
76
79 {
80 return *m_turbulence;
81 }
82
84 const IOManager& io_manager() const { return *m_io_mgr; }
85
87 const PostProcessManager& post_manager() const { return *m_post_mgr; }
88
91 {
92 return m_overset_mgr.get();
93 }
94
95 MeshMap* mesh_mapping() { return m_mesh_map.get(); }
96 const MeshMap* mesh_mapping() const { return m_mesh_map.get(); }
97
100
102 const HelicsStorage& helics() const { return *m_helics; }
103
104 bool has_overset() const;
105
108
110 void init_physics();
111
113 void activate_overset();
114
116 void activate_mesh_map();
117
118 bool has_mesh_mapping() const { return m_mesh_mapping; }
119
120 bool is_anelastic() const;
121
122private:
123 amrex::AmrCore& m_mesh;
124
126
128
130
132
133 std::unique_ptr<turbulence::TurbulenceModel> m_turbulence;
134
135 std::unique_ptr<IOManager> m_io_mgr;
136
137 std::unique_ptr<PostProcessManager> m_post_mgr;
138
139 std::unique_ptr<OversetManager> m_overset_mgr;
140
141 std::unique_ptr<MeshMap> m_mesh_map;
142
143 std::unique_ptr<ExtSolverMgr> m_ext_solver_mgr;
144
145 std::unique_ptr<HelicsStorage> m_helics;
146
147 bool m_mesh_mapping{false};
148};
149
150} // namespace amr_wind
151
152#endif /* CFDSIM_H */
Definition CFDSim.H:47
turbulence::TurbulenceModel & turbulence_model()
Definition CFDSim.H:77
void activate_mesh_map()
Activate mesh mapping.
Definition CFDSim.cpp:65
SimTime m_time
Definition CFDSim.H:125
std::unique_ptr< ExtSolverMgr > m_ext_solver_mgr
Definition CFDSim.H:143
const pde::PDEMgr & pde_manager() const
Definition CFDSim.H:66
const PhysicsMgr::TypeVector & physics() const
Definition CFDSim.H:72
HelicsStorage & helics()
Definition CFDSim.H:101
FieldRepo & repo()
Return the field repository.
Definition CFDSim.H:62
std::unique_ptr< IOManager > m_io_mgr
Definition CFDSim.H:135
std::unique_ptr< turbulence::TurbulenceModel > m_turbulence
Definition CFDSim.H:133
PhysicsMgr & physics_manager()
Definition CFDSim.H:68
const HelicsStorage & helics() const
Definition CFDSim.H:102
const MeshMap * mesh_mapping() const
Definition CFDSim.H:96
const OversetManager * overset_manager() const
Definition CFDSim.H:90
bool has_mesh_mapping() const
Definition CFDSim.H:118
PhysicsMgr::TypeVector & physics()
Definition CFDSim.H:71
FieldRepo & repo() const
Definition CFDSim.H:63
PostProcessManager & post_manager()
Definition CFDSim.H:86
amrex::AmrCore & mesh()
Return the AMR mesh hierarchy.
Definition CFDSim.H:54
void activate_overset()
Activate overset connectivity.
Definition CFDSim.cpp:55
const PhysicsMgr & physics_manager() const
Definition CFDSim.H:69
MeshMap * mesh_mapping()
Definition CFDSim.H:95
void create_turbulence_model()
Instantiate the turbulence model based on user inputs.
Definition CFDSim.cpp:25
OversetManager * overset_manager()
Definition CFDSim.H:89
amrex::AmrCore & m_mesh
Definition CFDSim.H:123
void init_physics()
Instantiate all physics instances based on user inputs.
Definition CFDSim.cpp:44
bool is_anelastic() const
Definition CFDSim.cpp:76
PhysicsMgr m_physics_mgr
Definition CFDSim.H:131
FieldRepo m_repo
Definition CFDSim.H:127
CFDSim(amrex::AmrCore &mesh)
Definition CFDSim.cpp:13
std::unique_ptr< OversetManager > m_overset_mgr
Definition CFDSim.H:139
bool m_mesh_mapping
Definition CFDSim.H:147
std::unique_ptr< HelicsStorage > m_helics
Definition CFDSim.H:145
const SimTime & time() const
Definition CFDSim.H:59
const amrex::AmrCore & mesh() const
Definition CFDSim.H:55
SimTime & time()
Return simulation time control.
Definition CFDSim.H:58
std::unique_ptr< PostProcessManager > m_post_mgr
Definition CFDSim.H:137
bool has_overset() const
Definition CFDSim.cpp:63
pde::PDEMgr m_pde_mgr
Definition CFDSim.H:129
ExtSolverMgr & ext_solver_manager()
Definition CFDSim.H:98
std::unique_ptr< MeshMap > m_mesh_map
Definition CFDSim.H:141
const turbulence::TurbulenceModel & turbulence_model() const
Definition CFDSim.H:78
const PostProcessManager & post_manager() const
Definition CFDSim.H:87
const IOManager & io_manager() const
Definition CFDSim.H:84
IOManager & io_manager()
Definition CFDSim.H:83
const ExtSolverMgr & ext_solver_manager() const
Definition CFDSim.H:99
pde::PDEMgr & pde_manager()
Definition CFDSim.H:65
TypeVector & objects()
Return a vector of the registered objects.
Definition CollMgr.H:51
amrex::Vector< TypePtr > TypeVector
Definition CollMgr.H:25
Definition ExtSolver.H:20
Definition FieldRepo.H:86
Definition helics.H:17
Definition IOManager.H:32
Definition MeshMap.H:31
Definition OversetManager.H:23
Definition Physics.H:100
Definition PostProcessing.H:63
Definition SimTime.H:30
Definition PDEBase.H:115
Definition TurbulenceModel.H:32
Definition BCInterface.cpp:7