/home/runner/work/amr-wind/amr-wind/amr-wind/physics/mms/MMS.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/physics/mms/MMS.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
MMS.H
Go to the documentation of this file.
1#ifndef MMS_H
2#define MMS_H
3
6#include "amr-wind/CFDSim.H"
7
8namespace amr_wind::mms {
9
10using FuncDef = double (*)(double, double, double);
11
16class MMS : public Physics::Register<MMS>
17{
18public:
19 static std::string identifier() { return "MMS"; }
20
21 explicit MMS(const CFDSim& sim);
22
23 ~MMS() override = default;
24
25 void initialize_fields(int level, const amrex::Geometry& geom) override;
26
27 void fill_src();
28
29 amrex::Real compute_error(const int comp, const Field& field, FuncDef f);
30
31 void post_init_actions() override;
32
33 void post_regrid_actions() override;
34
35 void pre_advance_work() override {}
36
37 void post_advance_work() override;
38
39private:
42 const amrex::AmrCore& m_mesh;
46
47 const int m_w = 18;
48 const std::string m_output_fname = "mms.log";
49
50 std::unordered_map<std::string, amrex::Real> m_params_map = {
51 {"a", 1.05}, {"b", 2.15}, {"c", -3.2}, {"d", 10.1},
52 {"beta", 2.2}, {"gamma", 2.4}, {"delta", 2.0}, {"kx", 1.0},
53 {"ky", 1.0}, {"kz", 1.0}, {"nu", 1.0}};
54};
55} // namespace amr_wind::mms
56
57#endif /* MMS_H */
Definition CFDSim.H:47
Definition Field.H:116
Definition FieldRepo.H:86
Definition SimTime.H:30
Definition MMS.H:17
const amrex::AmrCore & m_mesh
Definition MMS.H:42
void post_init_actions() override
Definition MMS.cpp:117
void post_advance_work() override
Definition MMS.cpp:179
const amr_wind::SimTime & m_time
Definition MMS.H:40
Field & m_density
Definition MMS.H:44
MMS(const CFDSim &sim)
Definition MMS.cpp:10
Field & m_mms_vel_source
Definition MMS.H:45
void post_regrid_actions() override
Definition MMS.cpp:119
Field & m_velocity
Definition MMS.H:43
static std::string identifier()
Definition MMS.H:19
void pre_advance_work() override
Definition MMS.H:35
const std::string m_output_fname
Definition MMS.H:48
~MMS() override=default
void fill_src()
Definition MMS.cpp:82
std::unordered_map< std::string, amrex::Real > m_params_map
Definition MMS.H:50
const int m_w
Definition MMS.H:47
amrex::Real compute_error(const int comp, const Field &field, FuncDef f)
Definition MMS.cpp:122
void initialize_fields(int level, const amrex::Geometry &geom) override
Definition MMS.cpp:46
const FieldRepo & m_repo
Definition MMS.H:41
Definition MMS.cpp:8
double(*)(double, double, double) FuncDef
Definition MMS.H:10