Implementation of the serendipity DDR scheme for the Navier-Stokes problem in curl-curl formulation.
More...
Implementation of the serendipity DDR scheme for the Navier-Stokes problem in curl-curl formulation.
- Model: solve the equations with the following boundary conditions:
- natural: impose u.n and curl u x n on the boundary.
- essential: impose the tangential component of u and p on the boundary
- Nomenclature: we use the following terms.
- DOF (degree of freedom): all the components of the velocity and pressure.
- UKN (unknowns): only the non-Dirichlet components (components in the system before static condensation).
- SCUKN: statically condensed (eliminated) unknowns.
- GLUKN: globally coupled unknowns (non-statically condensed).
All the local calculations are made on all the DOFs (including the Lagrange multiplier). It's only when assembling the local contributions that we select the UKN (based on the map DOFtoUKN).
- Global vector: the global vector we manipulate has the DOFs of u first, then the DOFs of p, then the Lagrange multiplier. For each u,p we first put the vertices, then edge, then face, then cell DOFs. In each slice (vertex/edge/face) of the DOFs, the Dirichlet ones come first (we have re-numbered the geometric entities to ensure this).
◆ constant_curl_u
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return Eigen::Vector3d::Zero();
}
◆ constant_curl_u_cross_u
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return Eigen::Vector3d::Zero();
}
◆ constant_f
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return Eigen::Vector3d::Zero();
}
◆ constant_grad_p
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return Eigen::Vector3d::Zero();
}
◆ constant_p
Initial value:= [](const Eigen::Vector3d & x) -> double {
return 0.;
}
◆ constant_u
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return Eigen::Vector3d(1., 1., 1.);
}
◆ linear_curl_u
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return Eigen::Vector3d::Zero();
}
◆ linear_curl_u_cross_u
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return Eigen::Vector3d::Zero();
}
◆ linear_f
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
}
static NavierStokes::PressureGradientType linear_grad_p
Definition sddr-navier-stokes.hpp:582
◆ linear_grad_p
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
}
double pressure_scaling
Definition sddr-navier-stokes.hpp:464
◆ linear_p
Initial value:= [](const Eigen::Vector3d & x) -> double {
}
◆ linear_u
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return 1
e3*Eigen::Vector3d(x(0), -x(1), 0.);
}
@ Matrix
Definition basis.hpp:67
◆ navier_scaling
| double HArDCore3D::navier_scaling = 1. |
◆ PI
◆ pressflux_curl_u
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return Eigen::Vector3d::Zero();
}
◆ pressflux_curl_u_cross_u
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return Eigen::Vector3d::Zero();
}
◆ pressflux_f
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return Eigen::Vector3d::Zero();
}
◆ pressflux_grad_p
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return Eigen::Vector3d::Zero();
}
◆ pressflux_p
Initial value:= [](const Eigen::Vector3d & x) -> double {
}
◆ pressflux_u
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
}
const Hull lower_bottom_corner_x_one({VectorRd(1., 0., 0.), VectorRd(1.,.25, 0.), VectorRd(1.,.25,.25), VectorRd(1., 0.,.25)}, VectorRd(1., 0., 0.))
bool is_in(const VectorRd &x) const
Check if a point is in the convex hull.
Definition BoundaryConditions.cpp:26
◆ pressure_scaling
| double HArDCore3D::pressure_scaling = 1. |
|
constexpr |
◆ reynolds
| double HArDCore3D::reynolds = 1. |
◆ scal_u
◆ trigonometric_curl_u
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return 3. *
PI * Eigen::Vector3d(
cos(2. *
PI * x(0)) * sin(2. *
PI * x(1)) * sin(2. *
PI * x(2)),
-sin(2. *
PI * x(0)) * cos(2. *
PI * x(1)) * sin(2. *
PI * x(2)),
0.
);
}
static const double PI
Definition ddr-magnetostatics.hpp:187
◆ trigonometric_curl_u_cross_u
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return Eigen::Vector3d (3.0*
PI*sin(2*
PI*x.x())*pow(sin(2*
PI*x.z()), 2)*cos(2*
PI*x.x())*pow(cos(2*
PI*x.y()), 2),
3.0*
PI*sin(2*
PI*x.y())*pow(sin(2*
PI*x.z()), 2)*pow(cos(2*
PI*x.x()), 2)*cos(2*
PI*x.y()),
1.5*
PI*pow(sin(2*
PI*x.x()), 2)*sin(2*
PI*x.z())*pow(cos(2*
PI*x.y()), 2)*cos(2*
PI*x.z()) + 1.5*
PI*pow(sin(2*
PI*x.y()), 2)*sin(2*
PI*x.z())*pow(cos(2*
PI*x.x()), 2)*cos(2*
PI*x.z())
);
}
◆ trigonometric_f
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return (1./
reynolds) * 6. * std::pow(
PI, 2) * Eigen::Vector3d(
sin(2. *
PI * x(0)) * cos(2. *
PI * x(1)) * cos(2. *
PI * x(2)),
cos(2. *
PI * x(0)) * sin(2. *
PI * x(1)) * cos(2. *
PI * x(2)),
-2. * cos(2. *
PI * x(0)) * cos(2. *
PI * x(1)) * sin(2. *
PI * x(2))
)
}
static NavierStokes::ForcingTermType trigonometric_curl_u_cross_u
Definition sddr-navier-stokes.hpp:505
double navier_scaling
Definition sddr-navier-stokes.hpp:466
static NavierStokes::PressureGradientType trigonometric_grad_p
Definition sddr-navier-stokes.hpp:496
double reynolds
Definition sddr-navier-stokes.hpp:465
◆ trigonometric_grad_p
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
cos(2. *
PI * x(0)) * sin(2. *
PI * x(1)) * sin(2. *
PI * x(2)),
sin(2. *
PI * x(0)) * cos(2. *
PI * x(1)) * sin(2. *
PI * x(2)),
sin(2. *
PI * x(0)) * sin(2. *
PI * x(1)) * cos(2. *
PI * x(2))
);
}
◆ trigonometric_p
Initial value:= [](const Eigen::Vector3d & x) -> double {
}
◆ trigonometric_u
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return Eigen::Vector3d(
0.5 * sin(2. *
PI * x(0)) * cos(2. *
PI * x(1)) * cos(2. *
PI * x(2)),
0.5 * cos(2. *
PI * x(0)) * sin(2. *
PI * x(1)) * cos(2. *
PI * x(2)),
-cos(2. *
PI * x(0)) * cos(2. *
PI * x(1)) * sin(2. *
PI * x(2))
);
}
◆ vertical_curl_u
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return scal_u * Eigen::Vector3d(0, 0, -
PI*sin(
PI*x.x()) +
PI*sin(
PI*x.y()) );
}
constexpr double scal_u
Definition sddr-navier-stokes.hpp:595
◆ vertical_curl_u_cross_u
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
* Eigen::Vector3d (
-(-
PI*sin(
PI*x.x()) +
PI*sin(
PI*x.y()))*cos(
PI*x.x()),
(-
PI*sin(
PI*x.x()) +
PI*sin(
PI*x.y()))*cos(
PI*x.y()),
0.
);
}
◆ vertical_f
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
}
static NavierStokes::ForcingTermType vertical_curl_u_cross_u
Definition sddr-navier-stokes.hpp:613
static NavierStokes::PressureGradientType vertical_grad_p
Definition sddr-navier-stokes.hpp:610
◆ vertical_grad_p
◆ vertical_p
◆ vertical_u
Initial value:= [](const Eigen::Vector3d & x) -> Eigen::Vector3d {
return scal_u * Eigen::Vector3d( cos(
PI*x.y()), cos(
PI*x.x()), 1.);
}