/home/runner/work/amr-wind/amr-wind/amr-wind/boundary_conditions/velocity_bcs.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/boundary_conditions/velocity_bcs.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
velocity_bcs.H
Go to the documentation of this file.
1#ifndef VELOCITY_BCS_H
2#define VELOCITY_BCS_H
3
14
16
17template <typename WallOp>
19 Field& field,
20 const std::string& inflow_udf,
21 const amrex::AmrCore& mesh,
22 const SimTime& time)
23{
24 if (inflow_udf == "LinearProfile") {
27 mesh, time, InflowOp(field));
28 } else if (inflow_udf == "PowerLawProfile") {
31 mesh, time, InflowOp(field));
32 } else if (inflow_udf == "BurggrafLid") {
35 mesh, time, InflowOp(field));
36 } else if (inflow_udf == "Rankine") {
37 using InflowOp = BCOpCreator<udf::Rankine, WallOp>;
39 mesh, time, InflowOp(field));
40 } else if (inflow_udf == "CustomVelocity") {
43 mesh, time, InflowOp(field));
44 } else if (inflow_udf == "TwoLayer") {
47 mesh, time, InflowOp(field));
48 } else {
49 amrex::Abort("Velocity BC: Invalid dirichlet BC type = " + inflow_udf);
50 }
51}
52
54 Field& field,
55 const amrex::AmrCore& mesh,
56 const SimTime& time,
57 const amrex::Array<const std::string, 3>& udfs)
58{
59 const std::string& inflow_udf = udfs[0];
60 const std::string& inflow_outflow_udf = udfs[1];
61 const std::string& wall_udf = udfs[2];
62
63 if ((inflow_udf == "ConstDirichlet") &&
64 (inflow_outflow_udf == "ConstDirichlet") &&
65 (wall_udf == "ConstDirichlet")) {
66 return;
67 }
68
69 if (wall_udf != "ConstDirichlet") {
70 amrex::Abort(
71 "Velocity BC: Only constant dirichlet supported for Wall BC");
72 }
73
74 if (inflow_udf != "ConstDirichlet") {
76 field, inflow_udf, mesh, time);
77 }
78
79 if (inflow_outflow_udf != "ConstDirichlet") {
81 field, inflow_outflow_udf, mesh, time);
82 }
83}
84
85} // namespace amr_wind::vel_bc
86
87#endif /* VELOCITY_BCS_H */
Definition FieldFillPatchOps.H:174
Definition Field.H:116
void register_fill_patch_op(Args &&... args)
Definition Field.H:306
Definition SimTime.H:30
Definition velocity_bcs.H:15
void register_inflow_vel_dirichlet(Field &field, const std::string &inflow_udf, const amrex::AmrCore &mesh, const SimTime &time)
Definition velocity_bcs.H:18
void register_velocity_dirichlet(Field &field, const amrex::AmrCore &mesh, const SimTime &time, const amrex::Array< const std::string, 3 > &udfs)
Definition velocity_bcs.H:53
Definition FieldBCOps.H:228