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

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/physics/EkmanSpiral.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
EkmanSpiral.H
Go to the documentation of this file.
1#ifndef EkmanSpiral_H
2#define EkmanSpiral_H
3
6#include "amr-wind/CFDSim.H"
7
8namespace amr_wind {
9
13class EkmanSpiral : public Physics::Register<EkmanSpiral>
14{
15public:
16 static std::string identifier() { return "EkmanSpiral"; }
17
18 explicit EkmanSpiral(const CFDSim& sim);
19
20 ~EkmanSpiral() override = default;
21
22 void initialize_fields(int level, const amrex::Geometry& geom) override;
23
24 template <typename T>
25 amrex::Real compute_error(const Field& /*field*/);
26
27 void post_init_actions() override;
28
29 void post_regrid_actions() override {}
30
31 void pre_advance_work() override {}
32
33 void post_advance_work() override;
34
35private:
38 const amrex::AmrCore& m_mesh;
41
42 void output_error();
43
45 amrex::Real m_rho{1.0};
47 amrex::Real m_DE{0.0};
49 amrex::Real m_vel{15.0};
50
52 const int m_w{18};
53
55 const std::string m_output_fname{"ekman_spiral.log"};
56};
57} // namespace amr_wind
58
59#endif /* EkmanSpiral_H */
Definition CFDSim.H:47
Definition EkmanSpiral.H:14
void pre_advance_work() override
Definition EkmanSpiral.H:31
Field & m_density
Definition EkmanSpiral.H:40
EkmanSpiral(const CFDSim &sim)
Definition EkmanSpiral.cpp:40
const amr_wind::SimTime & m_time
Definition EkmanSpiral.H:36
static std::string identifier()
Definition EkmanSpiral.H:16
const std::string m_output_fname
error log file
Definition EkmanSpiral.H:55
const FieldRepo & m_repo
Definition EkmanSpiral.H:37
amrex::Real m_vel
velocity magnitude x-direction only
Definition EkmanSpiral.H:49
amrex::Real m_DE
Ekman depth.
Definition EkmanSpiral.H:47
const int m_w
output precision
Definition EkmanSpiral.H:52
void output_error()
Definition EkmanSpiral.cpp:187
void post_regrid_actions() override
Definition EkmanSpiral.H:29
void post_advance_work() override
Definition EkmanSpiral.cpp:203
void post_init_actions() override
Definition EkmanSpiral.cpp:201
amrex::Real m_rho
initial density value
Definition EkmanSpiral.H:45
const amrex::AmrCore & m_mesh
Definition EkmanSpiral.H:38
Field & m_velocity
Definition EkmanSpiral.H:39
void initialize_fields(int level, const amrex::Geometry &geom) override
Definition EkmanSpiral.cpp:99
~EkmanSpiral() override=default
amrex::Real compute_error(const Field &)
Definition EkmanSpiral.cpp:132
Definition Field.H:116
Definition FieldRepo.H:86
Definition SimTime.H:30
Definition BCInterface.cpp:7