36 #include <lifev/core/mesh/RegionMesh3DStructured.hpp> 37 #include <lifev/core/fem/BCFunction.hpp> 38 #include <lifev/navier_stokes/function/RossEthierSteinmanDec.hpp> 39 #include <lifev/navier_stokes/function/RossEthierSteinmanInc.hpp> 40 #include <lifev/navier_stokes/examples/TestCases/NavierStokesEthierSteinman.hpp> 41 #include <lifev/core/mesh/MeshLoadingUtility.hpp> 47 const Int NavierStokesEthierSteinman::LEFTWALL = 4;
48 const Int NavierStokesEthierSteinman::RIGHTWALL = 2;
49 const Int NavierStokesEthierSteinman::FRONTWALL = 1;
50 const Int NavierStokesEthierSteinman::BACKWALL = 3;
51 const Int NavierStokesEthierSteinman::TOPWALL = 6;
52 const Int NavierStokesEthierSteinman::BOTTOMWALL = 5;
54 const Int NavierStokesEthierSteinman::BOTTOMEDGE1 = 7;
55 const Int NavierStokesEthierSteinman::BOTTOMEDGE2 = 8;
56 const Int NavierStokesEthierSteinman::BOTTOMEDGE3 = 9;
57 const Int NavierStokesEthierSteinman::BOTTOMEDGE4 = 10;
58 const Int NavierStokesEthierSteinman::SIDEEDGE1 = 11;
59 const Int NavierStokesEthierSteinman::SIDEEDGE2 = 12;
60 const Int NavierStokesEthierSteinman::SIDEEDGE3 = 13;
61 const Int NavierStokesEthierSteinman::SIDEEDGE4 = 14;
62 const Int NavierStokesEthierSteinman::TOPEDGE1 = 15;
63 const Int NavierStokesEthierSteinman::TOPEDGE2 = 16;
64 const Int NavierStokesEthierSteinman::TOPEDGE3 = 17;
65 const Int NavierStokesEthierSteinman::TOPEDGE4 = 18;
67 const Int NavierStokesEthierSteinman::BOTTOMCORNER1 = 19;
68 const Int NavierStokesEthierSteinman::BOTTOMCORNER2 = 20;
69 const Int NavierStokesEthierSteinman::BOTTOMCORNER3 = 21;
70 const Int NavierStokesEthierSteinman::BOTTOMCORNER4 = 22;
71 const Int NavierStokesEthierSteinman::TOPCORNER1 = 23;
72 const Int NavierStokesEthierSteinman::TOPCORNER2 = 24;
73 const Int NavierStokesEthierSteinman::TOPCORNER3 = 25;
74 const Int NavierStokesEthierSteinman::TOPCORNER4 = 26;
76 NavierStokesEthierSteinman::NavierStokesEthierSteinman()
77 : NavierStokesProblem< esMesh_Type >()
79 RossEthierSteinmanUnsteadyDec::setA ( 1.0 );
80 RossEthierSteinmanUnsteadyDec::setD ( 1.0 );
81 RossEthierSteinmanUnsteadyDec::setViscosity ( M_viscosity );
82 RossEthierSteinmanUnsteadyDec::setDensity ( M_density );
85 NavierStokesEthierSteinman::~NavierStokesEthierSteinman()
91 NavierStokesEthierSteinman::hasExactSolution()
const 96 NavierStokesProblem< esMesh_Type >::function_Type
97 NavierStokesEthierSteinman::xexact()
99 return RossEthierSteinmanUnsteadyDec::xexact;
102 NavierStokesProblem< esMesh_Type >::function_Type
103 NavierStokesEthierSteinman::uexact()
105 return RossEthierSteinmanUnsteadyDec::uexact;
108 NavierStokesProblem< esMesh_Type >::function_Type
109 NavierStokesEthierSteinman::uderexact()
111 return RossEthierSteinmanUnsteadyDec::uderexact;
114 NavierStokesProblem< esMesh_Type >::function_Type
115 NavierStokesEthierSteinman::pexact()
117 return RossEthierSteinmanUnsteadyDec::pexact;
121 NavierStokesEthierSteinman::showMe ( std::ostream& output )
const 123 output <<
"To be implemented";
127 NavierStokesEthierSteinman::setViscosity (
const Real& viscosity )
129 NavierStokesProblem< esMesh_Type >::setViscosity ( viscosity );
130 RossEthierSteinmanUnsteadyDec::setViscosity ( viscosity );
134 NavierStokesEthierSteinman::setDensity (
const Real& density )
136 NavierStokesProblem< esMesh_Type >::setDensity ( density );
137 RossEthierSteinmanUnsteadyDec::setDensity ( density );
141 NavierStokesEthierSteinman::mesh ( std::shared_ptr< RegionMesh<LinearTetra> >& mesh )
const 143 if ( M_refinement == 0 )
145 std::cout <<
"ERROR: The mesh refinement requested is not valid." << std::endl;
148 std::vector<Real> width (3, -1.0);
149 std::vector<Real> shift (3, -1.0);
150 std::vector<UInt> numMeshElem (3, M_refinement);
151 MeshUtility::loadStructuredMesh ( mesh, 1, numMeshElem,
false, width, shift );
156 NavierStokesEthierSteinman::boundaryConditions ( std::shared_ptr<BCHandler> bcHandler )
const 158 BCFunctionBase uDirichlet ( RossEthierSteinmanUnsteadyDec::uexact );
159 BCFunctionBase uNeumann ( RossEthierSteinmanUnsteadyDec::fNeumann );
161 bcHandler->addBC (
"Flux", FRONTWALL, Natural, Full, uNeumann, 3 );
163 bcHandler->addBC (
"Top" , TOPWALL , LifeV::Essential , Full, uDirichlet, 3 );
164 bcHandler->addBC (
"Top" , TOPEDGE1 , LifeV::EssentialEdges , Full, uDirichlet, 3 );
165 bcHandler->addBC (
"Top" , TOPEDGE2 , LifeV::EssentialEdges , Full, uDirichlet, 3 );
166 bcHandler->addBC (
"Top" , TOPEDGE3 , LifeV::EssentialEdges , Full, uDirichlet, 3 );
167 bcHandler->addBC (
"Top" , TOPEDGE4 , LifeV::EssentialEdges , Full, uDirichlet, 3 );
168 bcHandler->addBC (
"Top" , TOPCORNER1 , LifeV::EssentialVertices, Full, uDirichlet, 3 );
169 bcHandler->addBC (
"Top" , TOPCORNER2 , LifeV::EssentialVertices, Full, uDirichlet, 3 );
170 bcHandler->addBC (
"Top" , TOPCORNER3 , LifeV::EssentialVertices, Full, uDirichlet, 3 );
171 bcHandler->addBC (
"Top" , TOPCORNER4 , LifeV::EssentialVertices, Full, uDirichlet, 3 );
172 bcHandler->addBC (
"Left" , LEFTWALL , LifeV::Essential , Full, uDirichlet, 3 );
173 bcHandler->addBC (
"Left" , SIDEEDGE1 , LifeV::EssentialEdges , Full, uDirichlet, 3 );
174 bcHandler->addBC (
"Left" , SIDEEDGE4 , LifeV::EssentialEdges , Full, uDirichlet, 3 );
175 bcHandler->addBC (
"Right" , RIGHTWALL , LifeV::Essential , Full, uDirichlet, 3 );
176 bcHandler->addBC (
"Right" , SIDEEDGE2 , LifeV::EssentialEdges , Full, uDirichlet, 3 );
177 bcHandler->addBC (
"Right" , SIDEEDGE3 , LifeV::EssentialEdges , Full, uDirichlet, 3 );
178 bcHandler->addBC (
"Back" , BACKWALL , LifeV::Essential , Full, uDirichlet, 3 );
179 bcHandler->addBC (
"Bottom", BOTTOMWALL , LifeV::Essential , Full, uDirichlet, 3 );
180 bcHandler->addBC (
"Bottom", BOTTOMEDGE1 , LifeV::EssentialEdges , Full, uDirichlet, 3 );
181 bcHandler->addBC (
"Bottom", BOTTOMEDGE2 , LifeV::EssentialEdges , Full, uDirichlet, 3 );
182 bcHandler->addBC (
"Bottom", BOTTOMEDGE3 , LifeV::EssentialEdges , Full, uDirichlet, 3 );
183 bcHandler->addBC (
"Bottom", BOTTOMEDGE4 , LifeV::EssentialEdges , Full, uDirichlet, 3 );
184 bcHandler->addBC (
"Bottom", BOTTOMCORNER1, LifeV::EssentialVertices, Full, uDirichlet, 3 );
185 bcHandler->addBC (
"Bottom", BOTTOMCORNER2, LifeV::EssentialVertices, Full, uDirichlet, 3 );
186 bcHandler->addBC (
"Bottom", BOTTOMCORNER3, LifeV::EssentialVertices, Full, uDirichlet, 3 );
187 bcHandler->addBC (
"Bottom", BOTTOMCORNER4, LifeV::EssentialVertices, Full, uDirichlet, 3 );
191 NavierStokesEthierSteinman::name()
const 193 return "Ethier-Steinman problem";
int32_type Int
Generic integer data.
double Real
Generic real data.