/home/runner/work/amr-wind/amr-wind/amr-wind/equation_systems/icns/source_terms/GeostrophicForcing.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/equation_systems/icns/source_terms/GeostrophicForcing.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
GeostrophicForcing.H
Go to the documentation of this file.
1#ifndef GEOSTROPHICFORCING_H
2#define GEOSTROPHICFORCING_H
3
6#include "AMReX_REAL.H"
7
8using namespace amrex::literals;
9
10namespace amr_wind::pde::icns {
11
15class GeostrophicForcing : public MomentumSource::Register<GeostrophicForcing>
16{
17public:
18 static std::string identifier() { return "GeostrophicForcing"; }
19
20 explicit GeostrophicForcing(const CFDSim& /*unused*/);
21
23
24 void operator()(
25 const int lev,
26 const amrex::MFIter& mfi,
27 const amrex::Box& bx,
28 const FieldState fstate,
29 const amrex::Array4<amrex::Real>& src_term) const override;
30
31private:
33 const amrex::AmrCore& m_mesh;
34
36 std::string m_vel_timetable;
37
39 amrex::Vector<amrex::Real> m_time_table;
40
42 amrex::Vector<amrex::Real> m_speed_table;
43
45 amrex::Vector<amrex::Real> m_direction_table;
46
48 amrex::Real m_coriolis_factor;
49
51 bool m_use_phase_ramp{false};
52
54 int m_n_band{2};
55
57 amrex::Vector<amrex::Real> m_target_vel{0.0_rt, 0.0_rt, 0.0_rt};
58
60 amrex::Vector<amrex::Real> m_g_forcing{0.0_rt, 0.0_rt, 0.0_rt};
61
62 bool m_is_horizontal{false};
63
65 amrex::Real m_forcing_mphase0;
67 amrex::Real m_forcing_mphase1;
68
70 amrex::Real m_water_level;
71
73 const Field* m_vof;
74};
75
76} // namespace amr_wind::pde::icns
77
78#endif /* GEOSTROPHICFORCING_H */
Definition CFDSim.H:54
Definition Field.H:116
Definition SimTime.H:33
const Field * m_vof
VOF field, to avoid forcing on liquid above force-off height.
Definition GeostrophicForcing.H:73
amrex::Real m_water_level
Local storage of interface location.
Definition GeostrophicForcing.H:70
amrex::Vector< amrex::Real > m_time_table
Velocity forcing time table.
Definition GeostrophicForcing.H:39
bool m_use_phase_ramp
Activated when water is present in domain.
Definition GeostrophicForcing.H:51
const amrex::AmrCore & m_mesh
Definition GeostrophicForcing.H:33
int m_n_band
Number of cells in band to prevent forcing near liquid.
Definition GeostrophicForcing.H:54
amrex::Real m_forcing_mphase1
Height from water interface over which force is ramped.
Definition GeostrophicForcing.H:67
const SimTime & m_time
Definition GeostrophicForcing.H:32
std::string m_vel_timetable
File name for target velocity time table.
Definition GeostrophicForcing.H:36
amrex::Vector< amrex::Real > m_speed_table
Velocity forcing speed table.
Definition GeostrophicForcing.H:42
amrex::Vector< amrex::Real > m_g_forcing
Forcing source term (pressure gradient)
Definition GeostrophicForcing.H:60
amrex::Real m_forcing_mphase0
Height from water interface where force is off.
Definition GeostrophicForcing.H:65
GeostrophicForcing(const CFDSim &)
Definition GeostrophicForcing.cpp:28
amrex::Vector< amrex::Real > m_target_vel
Target velocity.
Definition GeostrophicForcing.H:57
bool m_is_horizontal
Definition GeostrophicForcing.H:62
void operator()(const int lev, const amrex::MFIter &mfi, const amrex::Box &bx, const FieldState fstate, const amrex::Array4< amrex::Real > &src_term) const override
Definition GeostrophicForcing.cpp:102
static std::string identifier()
Definition GeostrophicForcing.H:18
amrex::Vector< amrex::Real > m_direction_table
Velocity forcing direction table.
Definition GeostrophicForcing.H:45
amrex::Real m_coriolis_factor
Coriolis factor.
Definition GeostrophicForcing.H:48
FieldState
Definition FieldDescTypes.H:14
Definition ABLForcing.cpp:14