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

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/physics/BurggrafFlow.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
BurggrafFlow.H
Go to the documentation of this file.
1#ifndef BurggrafFlow_H
2#define BurggrafFlow_H
3
6#include "amr-wind/CFDSim.H"
7
8namespace amr_wind::burggraf {
9
10namespace {
11
12struct UExact
13{
14 AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real
15 operator()(const amrex::Real /*x*/, const amrex::Real /*y*/) const;
16 const int m_comp{0};
17};
18
19struct VExact
20{
21 AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real
22 operator()(const amrex::Real /*x*/, const amrex::Real /*y*/) const;
23 const int m_comp{1};
24};
25
26struct WExact
27{
28 AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real
29 operator()(const amrex::Real /*x*/, const amrex::Real /*y*/) const;
30 const int m_comp{2};
31};
32
33} // namespace
34
40class BurggrafFlow : public Physics::Register<BurggrafFlow>
41{
42public:
43 static std::string identifier() { return "BurggrafFlow"; }
44
45 explicit BurggrafFlow(const CFDSim& sim);
46
47 ~BurggrafFlow() override = default;
48
49 void initialize_fields(int level, const amrex::Geometry& geom) override;
50
51 template <typename T>
52 amrex::Real compute_error(const Field& /*field*/);
53
55
56 void post_init_actions() override;
57
58 void post_regrid_actions() override {}
59
60 void pre_advance_work() override {};
61
62 void post_advance_work() override;
63
64private:
67 const amrex::AmrCore& m_mesh;
68
72
73 void output_error();
74
76 amrex::Real m_rho{1.0};
77
79 const int m_w{18};
80
82 std::string m_output_fname{"burggraf.log"};
83};
84} // namespace amr_wind::burggraf
85
86#endif
const int m_comp
Definition BurggrafFlow.H:16
Definition CFDSim.H:47
Definition Field.H:116
Definition FieldRepo.H:86
Definition SimTime.H:30
Definition BurggrafFlow.H:41
std::string m_output_fname
error log file
Definition BurggrafFlow.H:82
const FieldRepo & m_repo
Definition BurggrafFlow.H:66
amrex::Real m_rho
initial density value
Definition BurggrafFlow.H:76
void initialize_fields(int level, const amrex::Geometry &geom) override
Definition BurggrafFlow.cpp:46
const int m_w
output precision
Definition BurggrafFlow.H:79
void post_advance_work() override
Definition BurggrafFlow.cpp:182
Field & m_source
Definition BurggrafFlow.H:71
void post_init_actions() override
Definition BurggrafFlow.cpp:180
const amr_wind::SimTime & m_time
Definition BurggrafFlow.H:65
void pre_advance_work() override
Definition BurggrafFlow.H:60
void post_regrid_actions() override
Definition BurggrafFlow.H:58
BurggrafFlow(const CFDSim &sim)
Definition BurggrafFlow.cpp:29
const amrex::AmrCore & m_mesh
Definition BurggrafFlow.H:67
void output_error()
Definition BurggrafFlow.cpp:164
Field & m_velocity
Definition BurggrafFlow.H:69
static std::string identifier()
Definition BurggrafFlow.H:43
~BurggrafFlow() override=default
Field & m_density
Definition BurggrafFlow.H:70
amrex::Real compute_error(const Field &)
Definition BurggrafFlow.cpp:111
Definition BurggrafFlow.cpp:9