/home/runner/work/amr-wind/amr-wind/amr-wind/equation_systems/vof/vof_bcop.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/equation_systems/vof/vof_bcop.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
vof_bcop.H
Go to the documentation of this file.
1#ifndef VOF_BCOP_H
2#define VOF_BCOP_H
3
7
8namespace amr_wind::pde {
9
13template <>
14struct BCOp<VOF>
15{
16 BCOp(PDEFields& fields, const SimTime& time)
17 : m_fields(fields), m_time(time)
18 {}
19
20 void init_bcs()
21 {
22 BCVOF bc(m_fields.field);
24
25 auto& density = m_fields.repo.get_field("density");
26 BCDensityMod bc_dens(density);
28
29 // No source terms currently exist for VOF, so this is inconsequential
30 BCSrcTerm bc_src(m_fields.src_term);
31 bc_src();
32 }
33
34 void apply_bcs(const FieldState rho_state)
35 {
36 amrex::IntVect ng_diff(1);
37 auto& field = m_fields.field;
38 if ((rho_state != FieldState::Old && rho_state != FieldState::New)) {
39 amrex::Abort(
40 "vof_bcop.H apply_bcs(): a state other than New or Old was "
41 "used. The time used for fillphysbc must be evaluated before "
42 "using a different state for this routine.");
43 }
44 if (rho_state == FieldState::New) {
45 field.fillphysbc(m_time.new_time(), ng_diff);
46 }
47 field.apply_bc_funcs(rho_state);
48 }
49
52};
53
54} // namespace amr_wind::pde
55
56#endif /* VOF_BCOP_H */
Definition vof_bciface.H:96
Definition BCInterface.H:141
Definition vof_bciface.H:13
Definition SimTime.H:30
FieldState
Definition FieldDescTypes.H:14
@ New
Same as FieldState::NP1.
Definition FieldDescTypes.H:20
@ Old
Same as FieldState::N.
Definition FieldDescTypes.H:21
Definition AdvOp_Godunov.H:18
void init_bcs()
Definition vof_bcop.H:20
PDEFields & m_fields
Definition vof_bcop.H:50
BCOp(PDEFields &fields, const SimTime &time)
Definition vof_bcop.H:16
void apply_bcs(const FieldState rho_state)
Definition vof_bcop.H:34
const SimTime & m_time
Definition vof_bcop.H:51
Definition PDEFields.H:27
Definition vof.H:17
static constexpr amrex::Real default_bc_value
Definition vof.H:29
static constexpr amrex::Real default_density_bc_value
Definition vof.H:30