36 #include <lifev/core/mesh/RegionMesh3DStructured.hpp> 37 #include <lifev/core/fem/BCFunction.hpp> 38 #include <lifev/navier_stokes/examples/TestCases/NavierStokesCavity.hpp> 39 #include <lifev/core/mesh/MeshLoadingUtility.hpp> 45 const Int NavierStokesCavity::LEFTWALL = 4;
46 const Int NavierStokesCavity::RIGHTWALL = 2;
47 const Int NavierStokesCavity::FRONTWALL = 1;
48 const Int NavierStokesCavity::BACKWALL = 3;
49 const Int NavierStokesCavity::TOPWALL = 6;
50 const Int NavierStokesCavity::BOTTOMWALL = 5;
52 const Int NavierStokesCavity::BOTTOMEDGE1 = 7;
53 const Int NavierStokesCavity::BOTTOMEDGE2 = 8;
54 const Int NavierStokesCavity::BOTTOMEDGE3 = 9;
55 const Int NavierStokesCavity::BOTTOMEDGE4 = 10;
56 const Int NavierStokesCavity::SIDEEDGE1 = 11;
57 const Int NavierStokesCavity::SIDEEDGE2 = 12;
58 const Int NavierStokesCavity::SIDEEDGE3 = 13;
59 const Int NavierStokesCavity::SIDEEDGE4 = 14;
60 const Int NavierStokesCavity::TOPEDGE1 = 15;
61 const Int NavierStokesCavity::TOPEDGE2 = 16;
62 const Int NavierStokesCavity::TOPEDGE3 = 17;
63 const Int NavierStokesCavity::TOPEDGE4 = 18;
65 const Int NavierStokesCavity::BOTTOMCORNER1 = 19;
66 const Int NavierStokesCavity::BOTTOMCORNER2 = 20;
67 const Int NavierStokesCavity::BOTTOMCORNER3 = 21;
68 const Int NavierStokesCavity::BOTTOMCORNER4 = 22;
69 const Int NavierStokesCavity::TOPCORNER1 = 23;
70 const Int NavierStokesCavity::TOPCORNER2 = 24;
71 const Int NavierStokesCavity::TOPCORNER3 = 25;
72 const Int NavierStokesCavity::TOPCORNER4 = 26;
74 NavierStokesCavity::NavierStokesCavity()
75 : NavierStokesProblem< RegionMesh< LinearTetra > >()
80 NavierStokesCavity::~NavierStokesCavity()
86 NavierStokesCavity::showMe ( std::ostream& output )
const 88 output <<
"To be implemented";
92 NavierStokesCavity::lidBC (
const LifeV::Real& ,
108 NavierStokesCavity::fZero (
const LifeV::Real& ,
118 NavierStokesCavity::mesh ( std::shared_ptr< RegionMesh<LinearTetra> >& mesh )
const 120 if ( M_refinement == 0 )
122 std::cout <<
"ERROR: The mesh refinement requested is not valid." << std::endl;
125 std::vector<Real> width (3, -1.0);
126 std::vector<Real> shift (3, -1.0);
127 std::vector<UInt> numMeshElem (3, M_refinement);
128 MeshUtility::loadStructuredMesh ( mesh, 1, numMeshElem,
false, width, shift );
133 NavierStokesCavity::boundaryConditions ( std::shared_ptr<BCHandler> bcHandler )
const 135 LifeV::BCFunctionBase uZero (fZero);
136 LifeV::BCFunctionBase uLid (lidBC);
138 std::vector<LifeV::ID> yComp (1);
141 bcHandler->addBC (
"Top" , TOPWALL , LifeV::Essential , LifeV::Full , uLid , 3 );
142 bcHandler->addBC (
"Top" , TOPEDGE1 , LifeV::EssentialEdges , LifeV::Full , uLid , 3 );
143 bcHandler->addBC (
"Top" , TOPEDGE2 , LifeV::EssentialEdges , LifeV::Full , uLid , 3 );
144 bcHandler->addBC (
"Top" , TOPEDGE3 , LifeV::EssentialEdges , LifeV::Full , uLid , 3 );
145 bcHandler->addBC (
"Top" , TOPEDGE4 , LifeV::EssentialEdges , LifeV::Full , uLid , 3 );
146 bcHandler->addBC (
"Top" , TOPCORNER1 , LifeV::EssentialVertices, LifeV::Full , uLid , 3 );
147 bcHandler->addBC (
"Top" , TOPCORNER2 , LifeV::EssentialVertices, LifeV::Full , uLid , 3 );
148 bcHandler->addBC (
"Top" , TOPCORNER3 , LifeV::EssentialVertices, LifeV::Full , uLid , 3 );
149 bcHandler->addBC (
"Top" , TOPCORNER4 , LifeV::EssentialVertices, LifeV::Full , uLid , 3 );
150 bcHandler->addBC (
"Left" , LEFTWALL , LifeV::Essential , LifeV::Full , uZero, 3 );
151 bcHandler->addBC (
"Left" , SIDEEDGE1 , LifeV::EssentialEdges , LifeV::Full , uZero, 3 );
152 bcHandler->addBC (
"Left" , SIDEEDGE4 , LifeV::EssentialEdges , LifeV::Full , uZero, 3 );
153 bcHandler->addBC (
"Front" , FRONTWALL , LifeV::Essential , LifeV::Component, uZero, yComp );
154 bcHandler->addBC (
"Right" , RIGHTWALL , LifeV::Essential , LifeV::Full , uZero, 3 );
155 bcHandler->addBC (
"Right" , SIDEEDGE2 , LifeV::EssentialEdges , LifeV::Full , uZero, 3 );
156 bcHandler->addBC (
"Right" , SIDEEDGE3 , LifeV::EssentialEdges , LifeV::Full , uZero, 3 );
157 bcHandler->addBC (
"Back" , BACKWALL , LifeV::Essential , LifeV::Component, uZero, yComp );
158 bcHandler->addBC (
"Bottom", BOTTOMWALL , LifeV::Essential , LifeV::Full , uZero, 3 );
159 bcHandler->addBC (
"Bottom", BOTTOMEDGE1 , LifeV::EssentialEdges , LifeV::Full , uZero, 3 );
160 bcHandler->addBC (
"Bottom", BOTTOMEDGE2 , LifeV::EssentialEdges , LifeV::Full , uZero, 3 );
161 bcHandler->addBC (
"Bottom", BOTTOMEDGE3 , LifeV::EssentialEdges , LifeV::Full , uZero, 3 );
162 bcHandler->addBC (
"Bottom", BOTTOMEDGE4 , LifeV::EssentialEdges , LifeV::Full , uZero, 3 );
163 bcHandler->addBC (
"Bottom", BOTTOMCORNER1, LifeV::EssentialVertices, LifeV::Full , uZero, 3 );
164 bcHandler->addBC (
"Bottom", BOTTOMCORNER2, LifeV::EssentialVertices, LifeV::Full , uZero, 3 );
165 bcHandler->addBC (
"Bottom", BOTTOMCORNER3, LifeV::EssentialVertices, LifeV::Full , uZero, 3 );
166 bcHandler->addBC (
"Bottom", BOTTOMCORNER4, LifeV::EssentialVertices, LifeV::Full , uZero, 3 );
170 NavierStokesCavity::name()
const 172 return "Lid-driven cavity";
int32_type Int
Generic integer data.
double Real
Generic real data.