/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 void set_during_overset_advance(const bool flag)
121 {
123 }
124
126
127 bool is_anelastic() const;
128
129private:
130 amrex::AmrCore& m_mesh;
131
133
135
137
139
140 std::unique_ptr<turbulence::TurbulenceModel> m_turbulence;
141
142 std::unique_ptr<IOManager> m_io_mgr;
143
144 std::unique_ptr<PostProcessManager> m_post_mgr;
145
146 std::unique_ptr<OversetManager> m_overset_mgr;
147
148 std::unique_ptr<MeshMap> m_mesh_map;
149
150 std::unique_ptr<ExtSolverMgr> m_ext_solver_mgr;
151
152 std::unique_ptr<HelicsStorage> m_helics;
153
154 bool m_mesh_mapping{false};
155
156 // State of solver - know if during an overset timestep or not
158};
159
160} // namespace amr_wind
161
162#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:132
std::unique_ptr< ExtSolverMgr > m_ext_solver_mgr
Definition CFDSim.H:150
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:142
std::unique_ptr< turbulence::TurbulenceModel > m_turbulence
Definition CFDSim.H:140
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
void set_during_overset_advance(const bool flag)
Definition CFDSim.H:120
amrex::AmrCore & mesh()
Return the AMR mesh hierarchy.
Definition CFDSim.H:54
bool m_during_overset_advance
Definition CFDSim.H:157
bool is_during_overset_advance() const
Definition CFDSim.H:125
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:130
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:138
FieldRepo m_repo
Definition CFDSim.H:134
CFDSim(amrex::AmrCore &mesh)
Definition CFDSim.cpp:13
std::unique_ptr< OversetManager > m_overset_mgr
Definition CFDSim.H:146
bool m_mesh_mapping
Definition CFDSim.H:154
std::unique_ptr< HelicsStorage > m_helics
Definition CFDSim.H:152
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:144
bool has_overset() const
Definition CFDSim.cpp:63
pde::PDEMgr m_pde_mgr
Definition CFDSim.H:136
ExtSolverMgr & ext_solver_manager()
Definition CFDSim.H:98
std::unique_ptr< MeshMap > m_mesh_map
Definition CFDSim.H:148
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