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

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/equation_systems/icns/source_terms/BodyForce.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
BodyForce.H
Go to the documentation of this file.
1#ifndef BODYFORCE_H
2#define BODYFORCE_H
3
6#include <AMReX_GpuContainers.H>
7#include <AMReX_REAL.H>
8#include <AMReX_Vector.H>
9#include <cstddef>
10
11namespace amr_wind::pde::icns {
12
19class BodyForce : public MomentumSource::Register<BodyForce>
20{
21public:
22 static std::string identifier() { return "BodyForce"; }
23
24 explicit BodyForce(const CFDSim& /*sim*/);
25
26 ~BodyForce() override;
27
28 void operator()(
29 const int lev,
30 const amrex::MFIter& mfi,
31 const amrex::Box& bx,
32 const FieldState fstate,
33 const amrex::Array4<amrex::Real>& src_term) const override;
34
35 void read_bforce_profile(const std::string& filename);
36 void read_bforce_timetable(const std::string& filename);
37
38private:
41
42 const amrex::AmrCore& m_mesh;
43
45 amrex::Vector<amrex::Real> m_body_force{0.0, 0.0, 0.0};
46
48 std::string m_type{"uniform_constant"};
50 std::string m_utt_file;
51
53 amrex::Real m_omega{0.0};
54 std::string m_bforce_file;
56
57 amrex::Gpu::DeviceVector<amrex::Real> m_prof_x;
58 amrex::Gpu::DeviceVector<amrex::Real> m_prof_y;
59 amrex::Gpu::DeviceVector<amrex::Real> m_ht;
60
62 amrex::Vector<amrex::Real> m_time_table;
63 amrex::Vector<amrex::Real> m_fx_table;
64 amrex::Vector<amrex::Real> m_fy_table;
65 amrex::Vector<amrex::Real> m_fz_table;
66};
67
68} // namespace amr_wind::pde::icns
69
70#endif /* BODYFORCE_H */
Definition CFDSim.H:47
Definition SimTime.H:30
Definition BodyForce.H:20
std::string m_bforce_file
Definition BodyForce.H:54
amrex::Vector< amrex::Real > m_body_force
Forcing source term (pressure gradient)
Definition BodyForce.H:45
static std::string identifier()
Definition BodyForce.H:22
amrex::Vector< amrex::Real > m_fz_table
Definition BodyForce.H:65
amrex::Vector< amrex::Real > m_time_table
Vectors for storing uniform_timetable inputs.
Definition BodyForce.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 BodyForce.cpp:114
amrex::Vector< amrex::Real > m_fy_table
Definition BodyForce.H:64
amrex::Vector< amrex::Real > m_fx_table
Definition BodyForce.H:63
void read_bforce_timetable(const std::string &filename)
Definition BodyForce.cpp:92
std::string m_type
Body Force Type.
Definition BodyForce.H:48
const SimTime & m_time
Time.
Definition BodyForce.H:40
void read_bforce_profile(const std::string &filename)
Definition BodyForce.cpp:58
amrex::Gpu::DeviceVector< amrex::Real > m_prof_y
Definition BodyForce.H:58
amrex::Gpu::DeviceVector< amrex::Real > m_prof_x
Definition BodyForce.H:57
BodyForce(const CFDSim &)
Definition BodyForce.cpp:17
amrex::Gpu::DeviceVector< amrex::Real > m_ht
Definition BodyForce.H:59
const amrex::AmrCore & m_mesh
Definition BodyForce.H:42
std::string m_utt_file
Uniform time table file.
Definition BodyForce.H:50
amrex::Real m_omega
Angular frequency used in the oscillatory forcing.
Definition BodyForce.H:53
size_t m_bforce_profile_nhts
Definition BodyForce.H:55
FieldState
Definition FieldDescTypes.H:14
Definition ABLForcing.cpp:11