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

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/physics/multiphase/ZalesakDiskScalarVel.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
ZalesakDiskScalarVel.H
Go to the documentation of this file.
1#ifndef ZalesakDiskScalarVel_H
2#define ZalesakDiskScalarVel_H
3
6
11namespace amr_wind::zds {
12
13namespace {
14struct SCexact
15{
16 AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real operator()(
17 amrex::Real /*xc*/,
18 amrex::Real /*yc*/,
19 amrex::Real /*zc*/,
20 amrex::Real /*x*/,
21 amrex::Real /*y*/,
22 amrex::Real /*z*/,
23 amrex::Real /*radius*/,
24 amrex::Real /*alpha*/) const;
25 const int m_comp{0};
26};
27} // namespace
28
29class ZalesakDiskScalarVel : public Physics::Register<ZalesakDiskScalarVel>
30{
31
32 static_assert(
33 AMREX_SPACEDIM == 3,
34 "ZalesakDiskScalarVel requires 3 dimensional mesh");
35
36public:
37 static std::string identifier() { return "ZalesakDiskScalarVel"; }
38
39 explicit ZalesakDiskScalarVel(CFDSim& sim);
40
41 ~ZalesakDiskScalarVel() override = default;
42
44
45 void initialize_fields(int level, const amrex::Geometry& geom) override;
46
47 void post_init_actions() override {}
48
49 void post_regrid_actions() override {}
50
51 void pre_advance_work() override;
52
53 void post_advance_work() override;
54
55 template <typename T>
56 amrex::Real compute_error(const Field& /*field*/);
57
58private:
59 const CFDSim& m_sim;
60
64
66 amrex::Vector<amrex::Real> m_loc{0.5, 0.72, 0.24};
67
69 amrex::Real m_radius{0.16};
70
72 amrex::Real m_halfwidth{0.04};
73
75 amrex::Real m_depth{0.2};
76
78 amrex::Real m_TT{6.0};
79
80 void output_error();
81
83 const int m_w{18};
84
86 std::string m_output_fname{"zds.log"};
87};
88
89} // namespace amr_wind::zds
90
91#endif /* ZalesakDiskScalarVel_H */
const int m_comp
Definition BurggrafFlow.H:16
Definition CFDSim.H:47
Definition Field.H:116
Definition ZalesakDiskScalarVel.H:30
Field & m_density
Definition ZalesakDiskScalarVel.H:63
void pre_advance_work() override
Definition ZalesakDiskScalarVel.cpp:177
Field & m_levelset
Definition ZalesakDiskScalarVel.H:62
ZalesakDiskScalarVel(CFDSim &sim)
Definition ZalesakDiskScalarVel.cpp:41
std::string m_output_fname
error log file
Definition ZalesakDiskScalarVel.H:86
static std::string identifier()
Definition ZalesakDiskScalarVel.H:37
void post_regrid_actions() override
Definition ZalesakDiskScalarVel.H:49
void post_advance_work() override
Definition ZalesakDiskScalarVel.cpp:212
amrex::Real m_halfwidth
slot half-width value
Definition ZalesakDiskScalarVel.H:72
~ZalesakDiskScalarVel() override=default
amrex::Real m_radius
sphere radius value
Definition ZalesakDiskScalarVel.H:69
void output_error()
Definition ZalesakDiskScalarVel.cpp:319
const int m_w
output precision
Definition ZalesakDiskScalarVel.H:83
amrex::Real m_TT
prescribed velocity period
Definition ZalesakDiskScalarVel.H:78
const CFDSim & m_sim
Definition ZalesakDiskScalarVel.H:59
void post_init_actions() override
Definition ZalesakDiskScalarVel.H:47
amrex::Real m_depth
slot depth
Definition ZalesakDiskScalarVel.H:75
amrex::Vector< amrex::Real > m_loc
Initial ZalesakDiskScalarVel location.
Definition ZalesakDiskScalarVel.H:66
void initialize_fields(int level, const amrex::Geometry &geom) override
Initialize the levelset and velocity fields for Vortex Patch simulations.
Definition ZalesakDiskScalarVel.cpp:61
amrex::Real compute_error(const Field &)
Definition ZalesakDiskScalarVel.cpp:215
Field & m_velocity
Definition ZalesakDiskScalarVel.H:61
Definition ZalesakDiskScalarVel.cpp:9