Transient Flow
Vortex shedding
Introduction
This example is a two-dimensional steady-state laminar flow simulation of vortex shedding around a two-dimensional cylinder with a Reynolds number of 100.
The simulation conditions are as follows
- solver : buoyantPimpleNFoam
- turbulence model : laminar
- Reynolds No. : 100
Start BaramFlow and load mesh
Run the program and select [New Case] from the launcher. In the launcher, select [Pressure-based] for [Solver Type] and [None] for [Multiphase Model].
Use the given polyMesh folder. In the top tab, click [File]-[Load Mesh]-[OpenFOAM] in that order and select the polyMesh folder.
General
Change Time to Transient.
Models
For this example, we'll use Laminar for turbulence.
Materials
For this example, we use the condition of Reynolds number is 100 and velocity is 1.
Set the density and viscosity as follows
- density : 1 \(kg/m^3\)
- viscosity : 0.01 \(kg/ms\)
Boundary Conditions
Each boundary condition is set as follows
- cylinder : Wall
- Velocity Condition : No Slip
-
sym : Symmetry
-
out : Pressure Outlet
- Total Pressure : 0 (Pa)
- in : Velocity Inlet
- Velocity Specification Method : Magnitudde, Normal to Boundary
- Profile Type : Constant
- Velocity Magnitude : 1 (m/s)
- frontAndBackPlanes : Empty
Reference Values
Set the Reference Value for the aerodynamic coefficient calculation as follows.
- Area : 1
- Density : 1
- Length : 1
- Pressure : 0
- Velocity : 1
Numerical Conditions
In this example, we'll change the settings as shown below.
-
Use Momentum Predictor : active
-
Discretization Schemes
- Time : Second Order Implicit
- Pressure : Momentum Weighted Reconstruct
- Momentum : Second Order Upwind
-
Max iterations per Time Step : 10
- Number of Correctors : 2
Use default conditions for the rest.
Monitor
Monitor the Drag/Lift Coefficient acting on the cylinder and the velocity/pressure at a point 1 meter from the center of the cylinder.
Drag/Lift Coefficient
- Select [Add]-[Forces] button.
- Set the values as follows
- Write Interval : 1
- Lift Direction : 0 1 0
- Drag Direction : 1 0 0
- Center of Rotation : 0 0 0
- Boundaries : cylinder
Velocity and Pressure
- Select [Add]-[Points] button.
- Set the values as follows
- Write Interval : 1
- Field : Pressure
- Coordinate : 1 0 0
In the same way, set up Velocity Magnitude monitoring for the same point.
Initialization
Set X-Velocity as 1 and use default values for the rest.
Enter the value and click the Initialize button at the bottom. Then click the [File]-[Save] menu to save the case file.
Run
Change the values as shown below, and click [Start Calculation] button.
- Time Stepping Method : Adaptive
- Max Courant Number : 1
- End Time : 150
- Save Interval : 0.5
- Data Write Format : Binary
- Number of Cores : 4
Residuals
Monitorings
Post-processing
Draw the velocity and pressure distribution around the cylinder.
Click the parview button in [External tools] to open the paraview.
Change the [Case Type] to [Decomposed Case].
Change [Solid Color] to U or p_rgh and click [play] icon.
Time dependen Boundayr Condition
Introduction
This example sets up a boundary condition where the velocity and temperature at the inlet change over time.
It uses the pitzDaily mesh from the OpenFOAM tutorial.
The computational conditions are as follows
- solver : buoyantPimpleNFoam
- turbulence model : \(Standard\) \(k-\epsilon\)
- density : Perfect Gas
- viscosity : 1.79e-5 \(kg/ms\)
Start BaramFlow and load mesh
Run the program and select [New Case] from the launcher. In the launcher, select [Pressure-based] for [Solver Type] and [None] for [Multiphase Model].
Use the given polyMesh folder. In the top tab, click [File]-[Load Mesh]-[OpenFOAM] in that order and select the polyMesh folder.
General
Change Time to Transient.
Models
For this example, we'll use \(Standard\) \(k-\epsilon\) model for turbulence.
Change Eergy to Include.
Materials
For this example, we will use the properties of air.
- Density : Perfect Gas (m/s)
- Specific Heat (Cp) : 1004 \(J/kgK\) (m/s)
- Viscosity : 1.79e-05 \(kg/ms\)
- Thermal Conductivity : 0.0245 \(W/mK\)
Boundary Conditions
Each boundary condition is set as follows
- inlet : Velocity Inlet
- Velocity Specification Method : Magnitude, Normal to Boundary
- Velocity Profile Type : Temporal Distribution
- piecewise linear : (0, 1) (0.1 2) (0.2 1.5)
- Turbulent Intensity : 1 (%)
- Turbulent Viscosity Ratio : 10
- Temperature Profile Type : Temporal Distribution
- piecewise linear : (0, 300) (0.1 400) (0.2 350)
-
outlet : Pressure Outlet
- Total Pressure : 0 (Pa)
-
upperWall, lowerWall : Wall
- Velocity Condition : No Slip
- Temperature : Adiabatic
-
frontAndBack : empty
Numerical Conditions
For Numerical Conditions, use default values.
Monitor
Monitor flow rate and temperature at inlet.
Select [Monitors]-[Add]-[Forces] and set values as shown below.
- Surface Monitor 1
- Report Type : Mass Flow Rate
- Surface : inlet
- Surface Monitor 2
- Report Type : Area-Weighted Average
- Field Variable : Temperature
- Surface : inlet
Initialization
Set velocity, pressure, temperature and turbulence as follows.
-
Velocity
- X-Velocity : 0 (m/s)
- Y-Velocity : 0 (m/s)
- Z-Velocity : 0 (m/s)
-
Pressure
- 0 (Pa)
-
Temperature : 300 (K)
-
Turbulence
- Scale of Velocity : 1 (m/s)
- Turbulent Intensity : 1 (%)
- Turbulent Viscosity Ratio : 10
Enter the value and click the Initialize button at the bottom. Then click the [File]-[Save] menu to save the case file.
Run
Change the values as shown below, and click [Start Calculation] button.
- Time Step Size : 0.001
- End Time : 1
- Save Interval(Every) : 0.1
그림 11.9
When the calculation is started, you'll see a graph of Residuals and Monitor as shown below.
Post-processing
Check the distribution of temperature and velocity over time. Click the paraview button in [External tools] to open paraview.
Change the [Solid Color] at the top to T.
Press [Set Range] to adjust the temperature range to 340 - 350K.
Then click the Play icon at the top to see the temperature change over time.
The figure below shows the temperature distribution at the final moment.