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

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/equation_systems/icns/source_terms/ABLMesoForcingMom.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
ABLMesoForcingMom.H
Go to the documentation of this file.
1#ifndef ABLMESOFORCINGMOM
2#define ABLMESOFORCINGMOM
3
4#include <AMReX_REAL.H>
5#include <AMReX_Vector.H>
6#include <memory>
14
15namespace amr_wind::pde::icns {
16
24 : public ABLMesoscaleForcing
25 , public MomentumSource::Register<ABLMesoForcingMom>
26{
27public:
28 static std::string identifier() { return "ABLMesoForcingMom"; }
29
30 explicit ABLMesoForcingMom(const CFDSim& sim);
31
33
34 void operator()(
35 const int lev,
36 const amrex::MFIter& mfi,
37 const amrex::Box& bx,
38 const FieldState fstate,
39 const amrex::Array4<amrex::Real>& src_term) const override;
40
41 void mean_velocity_init(const ABLMesoscaleInput& ncfile);
42
44 const VelPlaneAveragingFine& vavg, const ABLMesoscaleInput& ncfile);
45
46 void
47 mean_velocity_heights(std::unique_ptr<ABLMesoscaleInput> const& ncfile);
48
50 const VelPlaneAveragingFine& vavg,
51 std::unique_ptr<ABLMesoscaleInput> const& ncfile);
52
53 amrex::Vector<amrex::Real>& mom_u_error() { return m_err_U; }
54 amrex::Vector<amrex::Real>& mom_v_error() { return m_err_V; }
55
56private:
57 // these are inputs
58 amrex::Gpu::DeviceVector<amrex::Real> m_meso_ht;
59 amrex::Gpu::DeviceVector<amrex::Real> m_meso_u_vals;
60 amrex::Gpu::DeviceVector<amrex::Real> m_meso_v_vals;
61
62 // these are the instantaneous planar averages
63 amrex::Gpu::DeviceVector<amrex::Real> m_vavg_ht;
64
65 // these specify the source term
66 amrex::Gpu::DeviceVector<amrex::Real> m_error_meso_avg_U;
67 amrex::Gpu::DeviceVector<amrex::Real> m_error_meso_avg_V;
68
69 amrex::Vector<amrex::Real> m_err_U;
70 amrex::Vector<amrex::Real> m_err_V;
71
72 // these should be m_ind_polyOrder+1 (currently, cubic polynomials are
73 // assumed)
74 amrex::Array<amrex::Real, 4> m_poly_coeff_U;
75 amrex::Array<amrex::Real, 4> m_poly_coeff_V;
76};
77
78} // namespace amr_wind::pde::icns
79
80#endif // ABLMESOFORCINGMOM_H
Definition ABLMesoscaleForcing.H:13
Definition ABLMesoscaleInput.H:11
Definition CFDSim.H:47
Definition FieldPlaneAveragingFine.H:114
Definition ABLMesoForcingMom.H:26
amrex::Vector< amrex::Real > m_err_V
Definition ABLMesoForcingMom.H:70
amrex::Gpu::DeviceVector< amrex::Real > m_meso_v_vals
Definition ABLMesoForcingMom.H:60
amrex::Array< amrex::Real, 4 > m_poly_coeff_V
Definition ABLMesoForcingMom.H:75
amrex::Gpu::DeviceVector< amrex::Real > m_meso_ht
Definition ABLMesoForcingMom.H:58
static std::string identifier()
Definition ABLMesoForcingMom.H:28
amrex::Gpu::DeviceVector< amrex::Real > m_error_meso_avg_U
Definition ABLMesoForcingMom.H:66
void mean_velocity_init(const ABLMesoscaleInput &ncfile)
Definition ABLMesoForcingMom.cpp:40
amrex::Gpu::DeviceVector< amrex::Real > m_vavg_ht
Definition ABLMesoForcingMom.H:63
amrex::Vector< amrex::Real > & mom_v_error()
Definition ABLMesoForcingMom.H:54
amrex::Vector< amrex::Real > m_err_U
Definition ABLMesoForcingMom.H:69
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 ABLMesoForcingMom.cpp:322
void mean_velocity_heights(std::unique_ptr< ABLMesoscaleInput > const &ncfile)
Definition ABLMesoForcingMom.cpp:93
amrex::Gpu::DeviceVector< amrex::Real > m_meso_u_vals
Definition ABLMesoForcingMom.H:59
amrex::Vector< amrex::Real > & mom_u_error()
Definition ABLMesoForcingMom.H:53
ABLMesoForcingMom(const CFDSim &sim)
Definition ABLMesoForcingMom.cpp:16
amrex::Gpu::DeviceVector< amrex::Real > m_error_meso_avg_V
Definition ABLMesoForcingMom.H:67
amrex::Array< amrex::Real, 4 > m_poly_coeff_U
Definition ABLMesoForcingMom.H:74
FieldState
Definition FieldDescTypes.H:14
Definition ABLForcing.cpp:11