The test case described in here meets the typical reference problem for validating cfd software in a confined domain (Files for this test case can be downloaded from here).
The domain used in this test case is a square (whose edge length being 1 m) containing an incompressible fluid.
The boundary conditions applicable to the domain are:
Solid wall (u1=0 m/s, u2=0 m/s) on all walls with the exception to the upper wall.
Moving wall (u1= 1 m/s, u2= 0 m/s) on the upper wall.
The initial conditions applicable to the problem are:
The velocity components at every point of the domain are zero, except to the points in the upper wall (lid) with a velocity set to u1= 1 m/s (for the horizontal velocity component), and u2 = 0 m/s ( for the vertical velocity component).
The problem domain is shown in the next drawing
The project to use in DynamFluid to carry out the simulation can be found in the following link project. It contains a zip file with all the files needed to run the simulation.
Once, the files are decompressed, start the DynamFluid application, where the following dialog Box is shown:
Then, press the button which is on the right of the "Location" caption. This action will show a dialog box for selecting the folder (directory) where the project files have been unzipped.
Afterwards, press the botton right to the "Project Name" caption, which will open a File Dialog box to select the file LidDrivenCavity100x100tria.vac. Then press the Ok button which will open the LidDrivenCavity100x100tria DynamFluid project.
The elements used in the mesh used for simulating this problem have been TRIA elements. A picture of the mesh used can be found next.
Alternatively, this project can be built from scratch:
Create a new project using a name of a non-existing project,
Fill in the project name in the Project Name Editbox, for example: LidDrivenCavityFlowNewProject.
Select Cfd as Problem type
This will create an empty project, ready to include the geometry and the model objects.
After, the new project has been created, double-click in the LidDrivenCavityFlowNewProject.mod model file of the navigation window, which will open the empty model.
Next step in the process is defining four points representing the four corners of the Lid Driven Cavity (Geometry > Point), as located in the following positions:
P1 (x = 0.0, y=0.0). Identifier: 1.
P2 (x = 1.0, y=0.0). Identifier: 2.
P3 (x = 0.0, y=1.0): Identifier: 3.
P4 (x = 1.0, y=1.0): Identifier: 4
How to manage Points objets in the model is described in Points reference Topic. Bear in mind that when setting the identifier of the points (and the same applies for other objects in the model), its value must be greater than 0. There couldn’t be two objects of the same type having the same identifier.
The next picture shows the result after having defined the four points:
Note: The gravity volume force in the model needs to be set to 0.0 value. Navigate to Model > Source > Point Source, and edit the Source with identifier equal to 1. Change Component 2 (y-component) from -9.81 to 0.0.
4. Once the four points are defined, two lines are included in the model. Navigate to Geometry > Curve > Line, defining two new lines:
a. Line 1: Identifier equal to 1, from point with Identifier equal to 1 to point with Identifier equal to 2.
b. Line 2: Identifier equal to 2, from point with Identifier equal to 3 to point with Identifier equal to 4.
5. Next step is defining a ruled surface leveraging on the two previously defined lines. Navigate to Geometry > Surface > Ruled, defining the new surface:
a. Identifier equal to 1.
b. Guideline Curve 1 equal to 1.
c. Guideline Curve 2 equal to 2.
6. Once the ruled surface is defined, the subsequent step is meshing it. The algorithm to mesh the surface requires as input a Material applicable to each of the fluid elements that will create.
a. Create a new Fluidic property, Model > Material.
i. Set the Identifier editbox equal to 1.
ii. Set Type to Fluid.
iii. Navigate to the Fluidic Prop Tab.
iv. Define the properties of the material: Viscosity = 0.001 Pa s, Density Reference Temp. = 273 ºK (represents the Kelvin degrees), Compressibility = 100000 Kg / m s2 (K), and Sound velocity = 100 m/s (c). Take into account that the density (ρ) for a compressible material is equal to: . This means that the density of this material has been set to 1 Kg / m3.
v. Push Ok in the Material Dialogbox.
vi. Push Ok in the List of Materials Dialogbox.
b. Create a new Behaviour, Model > Behaviour.
i. Set the Identifier editbox equal to 1
ii. Set Type to Fluid.
iii. Navigate to Fluid Tab.
iv. Select 1 as the Fluid Material identifier (Choose 1 in the dropdown control of Fluid Material).
v. Push Ok in the Behaviour Dialogbox.
vi. Push Ok in the List of Behaviours Dialogbox.
7. Once, the material has been defined, navigate to Meshing > Element > Surface.
a. Chose the surface, setting the Identifier editbox to 1 in the MeshSurface dialog box.
b. In the Mesh options tab:
i. Mesh type: Structure.
ii. Numb. Element Dir 1: 100. Division: Linear. Ratio: 1.
iii. Numb. Element Dir 2: 100. Division: Linear. Ratio: 1.
c. In the Element Options tab:
i. Type of Element: Tria
ii. Rank: 1
iii. Number of integration points: 1
d. In the material tab:
i. Material: 1 (Identifier of the behavior defined in step 6.b).
e. Push Ok button, which will create the mesh of the surface using linear TRIA elements with behaviour (fluid material) equal to 1.
i. A log message is shown: The meshing of the object starts.
ii. Once the meshing is finished another log message is shown: The meshing of the object finishes.
f. You can check the result in the Model window, which will show an image similar to the one shown here:
The Surface Meshing command has created 20.000 tria elements, as it can be checked opening the List of Fluid Elements dialogbox, Model > Structure > Fluid Element.
8. Now, the boundary conditions to be used in the edge of the domain are to be defined:
a. Create a non-slip boundary condition to apply in the fixed solid walls (bottom, left and right edges). Navigate to Model > Constraints > Generic constraint. This will show the List of Constraints dialog box.
i. Click the New button.
ii. Set to 1 the Identifier of the new boundary condition.
iii. Choose 0 as the Ref. Coord. System.
iv. Select the Restrict checkbox of the first and second componenents of the boundary condition.
v. Click the Ok button.
i. Click the New button.
ii. Set to 1 the Identifier of the new boundary condition.
iii. Choose 0 as the Ref. Coord. System.
iv. Select the Restrict checkbox of the first and second componenents of the boundary condition.
v. Click the Ok button.
Click on the Edit buttom, and navigate to the Contraint tab of the Node dialogbox
b. Select 1 in the Variable Index dropdown list box, and select 1 in the Diritchlet Diplacement dropdown list box, which sets the velocity boundary condition number 1 to the node 13.
c. This process has to be repeated in all the nodes belonging to the boundary of the domain. Using the boundary condition with identity equal to 1 on the fixed walls (bottom, left and right), and the boundary condition with identity equal to 2 in the moving wall (upper wall).
10. Once all the objects in the domain have been defined, it's time to configure the simulation options.
a. Navigate to the Calculation > Configuration menu, which will show the Simulation Configuration dialogbox.
b. On the dialog box shown, choose the following options:
i. Simulation: Dynamic.
i. Type of Analysis: CFD - Incomp.
i. Increment: 0.001.
i. Starting instant: 0.0.
i. Final instant: 100.0.
i. Vel. Relax. factor: 0.666667.
i. Visc. Relax. factor: 0.666667.
i. Pres. Relax. factor: 0.666667.
i. Tolerance: 1e-6.
i. Stationary radio buttom selected.
i. Energy calculation unchecked.
11. Run the simulation: Click on the Calculation > Solving menu.
The project has been simulated for several Reynolds numbers (1000, 2500 and 5000). The results have been compared with Ghia, Ghia, and Shin (1982), "High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method", Journal of Computational Physics, Vol. 48, pp. 387-411. The results obtained and the comparison can be found in the next drawings.
Reynolds 1000
Reynolds 2500
Reynolds 5000