/home/runner/work/amr-wind/amr-wind/amr-wind/wind_energy/MOData.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/wind_energy/MOData.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
MOData.H
Go to the documentation of this file.
1#ifndef MODATA_H
2#define MODATA_H
3
5
6namespace amr_wind {
7
20struct MOData
21{
22 enum class ThetaCalcType {
23 HEAT_FLUX = 0,
25 };
26
27 amrex::Real zref{0.0};
28 amrex::Real z0{0.1};
29 amrex::Real utau;
30 amrex::Real kappa{0.41};
31 amrex::Real gravity{9.81};
32 amrex::Real obukhov_len{1.0e16};
33
34 amrex::RealArray vel_mean;
35 amrex::Real vmag_mean;
36 amrex::Real Su_mean;
37 amrex::Real Sv_mean;
38 amrex::Real theta_mean;
39
40 amrex::Real surf_temp_flux{0.0};
41 amrex::Real surf_temp;
42 amrex::Real ref_temp;
43
44 amrex::Real gamma_m{5.0};
45 amrex::Real gamma_h{5.0};
46 amrex::Real beta_m{16.0};
47 amrex::Real beta_h{16.0};
48
50
51 amrex::Real phi_m() const
52 {
53 return std::log(zref / z0) - calc_psi_m(zref / obukhov_len);
54 }
55
56 amrex::Real phi_m(amrex::Real z) const
57 {
58 return std::log(z / z0) - calc_psi_m(z / obukhov_len);
59 }
60
61 amrex::Real phi_h() const
62 {
63 return std::log(zref / z0) - calc_psi_h(zref / obukhov_len);
64 }
65
66 amrex::Real phi_h(amrex::Real z) const
67 {
68 return std::log(z / z0) - calc_psi_h(z / obukhov_len);
69 }
70
71 amrex::Real calc_psi_m(amrex::Real zeta) const;
72 amrex::Real calc_psi_h(amrex::Real zeta) const;
73 void update_fluxes(int max_iters = 25);
74};
75
76} // namespace amr_wind
77
78#endif /* MODATA_H */
Definition BCInterface.cpp:7
Definition MOData.H:21
amrex::RealArray vel_mean
Mean velocity (at zref)
Definition MOData.H:34
ThetaCalcType
Definition MOData.H:22
@ SURFACE_TEMPERATURE
Surface temperature specified.
@ HEAT_FLUX
Heat-flux specified.
amrex::Real surf_temp
Instantaneous surface temperature.
Definition MOData.H:41
amrex::Real surf_temp_flux
Heat flux.
Definition MOData.H:40
amrex::Real phi_h(amrex::Real z) const
Definition MOData.H:66
amrex::Real phi_m(amrex::Real z) const
Definition MOData.H:56
amrex::Real phi_h() const
Definition MOData.H:61
amrex::Real gravity
Acceleration due to gravity (m/s^2)
Definition MOData.H:31
amrex::Real obukhov_len
Non-dimensional Obukhov length.
Definition MOData.H:32
amrex::Real Su_mean
Mean wind speed times x-velocity (at zref)
Definition MOData.H:36
amrex::Real calc_psi_m(amrex::Real zeta) const
Definition MOData.cpp:17
amrex::Real Sv_mean
Mean wind speed times y-velocity (at zref)
Definition MOData.H:37
amrex::Real calc_psi_h(amrex::Real zeta) const
Definition MOData.cpp:27
void update_fluxes(int max_iters=25)
Definition MOData.cpp:36
amrex::Real beta_m
Definition MOData.H:46
amrex::Real vmag_mean
Mean wind speed (at zref)
Definition MOData.H:35
amrex::Real zref
Reference height (m)
Definition MOData.H:27
amrex::Real kappa
von Karman constant
Definition MOData.H:30
amrex::Real utau
Friction velocity (m/s)
Definition MOData.H:29
amrex::Real phi_m() const
Definition MOData.H:51
amrex::Real ref_temp
Reference temperature.
Definition MOData.H:42
ThetaCalcType alg_type
Definition MOData.H:49
amrex::Real gamma_m
Definition MOData.H:44
amrex::Real theta_mean
Mean potential temperature.
Definition MOData.H:38
amrex::Real z0
Roughness height (m)
Definition MOData.H:28
amrex::Real gamma_h
Definition MOData.H:45
amrex::Real beta_h
Definition MOData.H:47