CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

What are the best settings for a channel flow simulation?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ghorrocks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 11, 2022, 00:15
Default What are the best settings for a channel flow simulation?
  #1
Member
 
Ashkan Kashani
Join Date: Apr 2016
Posts: 46
Rep Power: 10
Ashkan Kashani is on a distinguished road
Hello all,
I want to use CFX to study the transient flow around a rectangular bluff body placed in a 2D open channel as shown in Figure 1. For the simulation, I am using the Free Surface Homogenous Multiphase model to capture the water-air interface. The boundary conditions used are as follows (consult Figure 1 for labels):
AE: water inlet (so Water Volume Fraction = 1 and Air Volume Fraction with a uniform Normal Speed of Uinlet = 35.2 cm/s.
DE & AB: no-slip wall
BC: outlet boundary condition with the Average Static Pressure being set as a hydrostatic pressure for the water phase and zero for the air phase, which is realized by the following expression:
PressureDist = WaterDensity * g * (-yGlobal)*WaterVF
DC: opening boundary condition, set by Opening Pres. and Dirc and a Relative Pressure of zero.
And finally, the two side faces are set as Symmetry boundaries to realize a 2D simulation.
Regarding initial conditions, I set the streamwise component of the velocity to Uinlet = 35.2 cm/s and the other two to zero. The top half of the channel is filled with the air phase (AirVF = step(yGlobal/1[m])) and the other half is filled with water at t = 0. The pressure field is also initialized by the same expression above.
Note the content of the CCL file has been copied and pasted to the end of this thread for further details.
I need to establish a 'uniform flow' (which, in my case, means constant depth and fully developed water velocity profile) within some certain distance upstream and downstream of the location where the bluff body is to be inserted in the model later. I need to ensure this location is not affected by the inlet and outlet boundaries. I was hoping that these settings would result in such a flow condition. However, as the transient solution continues, some strange waves, as shown in Figure 2, appear on the free surface and keep travelling back and forth with very slow attenuation. Apparently, it takes a very long simulation time for these waves to die down so that the desired uniform flow would take place. This makes the simulation very burdensome since I am not interested in this transient part of the solution.
I believe the problem stems from the inconsistency between the boundary conditions and the flow physics in the domain, or it might be related to the initial conditions. However, I am unsure what could be a better setting for this problem.
I would appreciate any comments.

P.S.

# State file created: 2022/10/10 20:58:47
# Build 18.2 2017-07-14T23:24:21.554000

LIBRARY:
CEL:
EXPRESSIONS:
AirVF = step((yGlobal)/1[m])
InletElev = (areaInt(Water.Volume \
Fraction)@Inlet_water+areaInt(Water.Volume Fraction)@Inlet_air)/0.0003
OutletElev = (areaInt(Water.Volume Fraction)@Outlet)/0.0003
PressureDist = WaterDensity *g*(-(yGlobal))*WaterVF
Uinlet = 35.2[cm/s]
WaterDensity = 997[kg m^-3]
WaterVF = 1-AirVF
END
END
MATERIAL: Air Ideal Gas
Material Description = Air Ideal Gas (constant Cp)
Material Group = Air Data, Calorically Perfect Ideal Gases
Option = Pure Substance
Thermodynamic State = Gas
PROPERTIES:
Option = General Material
EQUATION OF STATE:
Molar Mass = 28.96 [kg kmol^-1]
Option = Ideal Gas
END
SPECIFIC HEAT CAPACITY:
Option = Value
Specific Heat Capacity = 1.0044E+03 [J kg^-1 K^-1]
Specific Heat Type = Constant Pressure
END
REFERENCE STATE:
Option = Specified Point
Reference Pressure = 1 [atm]
Reference Specific Enthalpy = 0. [J/kg]
Reference Specific Entropy = 0. [J/kg/K]
Reference Temperature = 25 [C]
END
DYNAMIC VISCOSITY:
Dynamic Viscosity = 1.831E-05 [kg m^-1 s^-1]
Option = Value
END
THERMAL CONDUCTIVITY:
Option = Value
Thermal Conductivity = 2.61E-2 [W m^-1 K^-1]
END
ABSORPTION COEFFICIENT:
Absorption Coefficient = 0.01 [m^-1]
Option = Value
END
SCATTERING COEFFICIENT:
Option = Value
Scattering Coefficient = 0.0 [m^-1]
END
REFRACTIVE INDEX:
Option = Value
Refractive Index = 1.0 [m m^-1]
END
END
END
MATERIAL: Air at 25 C
Material Description = Air at 25 C and 1 atm (dry)
Material Group = Air Data, Constant Property Gases
Option = Pure Substance
Thermodynamic State = Gas
PROPERTIES:
Option = General Material
EQUATION OF STATE:
Density = 1.185 [kg m^-3]
Molar Mass = 28.96 [kg kmol^-1]
Option = Value
END
SPECIFIC HEAT CAPACITY:
Option = Value
Specific Heat Capacity = 1.0044E+03 [J kg^-1 K^-1]
Specific Heat Type = Constant Pressure
END
REFERENCE STATE:
Option = Specified Point
Reference Pressure = 1 [atm]
Reference Specific Enthalpy = 0. [J/kg]
Reference Specific Entropy = 0. [J/kg/K]
Reference Temperature = 25 [C]
END
DYNAMIC VISCOSITY:
Dynamic Viscosity = 1.831E-05 [kg m^-1 s^-1]
Option = Value
END
THERMAL CONDUCTIVITY:
Option = Value
Thermal Conductivity = 2.61E-02 [W m^-1 K^-1]
END
ABSORPTION COEFFICIENT:
Absorption Coefficient = 0.01 [m^-1]
Option = Value
END
SCATTERING COEFFICIENT:
Option = Value
Scattering Coefficient = 0.0 [m^-1]
END
REFRACTIVE INDEX:
Option = Value
Refractive Index = 1.0 [m m^-1]
END
THERMAL EXPANSIVITY:
Option = Value
Thermal Expansivity = 0.003356 [K^-1]
END
END
END
MATERIAL: Aluminium
Material Group = CHT Solids, Particle Solids
Option = Pure Substance
Thermodynamic State = Solid
PROPERTIES:
Option = General Material
EQUATION OF STATE:
Density = 2702 [kg m^-3]
Molar Mass = 26.98 [kg kmol^-1]
Option = Value
END
SPECIFIC HEAT CAPACITY:
Option = Value
Specific Heat Capacity = 9.03E+02 [J kg^-1 K^-1]
END
REFERENCE STATE:
Option = Specified Point
Reference Specific Enthalpy = 0 [J/kg]
Reference Specific Entropy = 0 [J/kg/K]
Reference Temperature = 25 [C]
END
THERMAL CONDUCTIVITY:
Option = Value
Thermal Conductivity = 237 [W m^-1 K^-1]
END
END
END
MATERIAL: Copper
Material Group = CHT Solids, Particle Solids
Option = Pure Substance
Thermodynamic State = Solid
PROPERTIES:
Option = General Material
EQUATION OF STATE:
Density = 8933 [kg m^-3]
Molar Mass = 63.55 [kg kmol^-1]
Option = Value
END
SPECIFIC HEAT CAPACITY:
Option = Value
Specific Heat Capacity = 3.85E+02 [J kg^-1 K^-1]
END
REFERENCE STATE:
Option = Specified Point
Reference Specific Enthalpy = 0 [J/kg]
Reference Specific Entropy = 0 [J/kg/K]
Reference Temperature = 25 [C]
END
THERMAL CONDUCTIVITY:
Option = Value
Thermal Conductivity = 401.0 [W m^-1 K^-1]
END
END
END
MATERIAL: Soot
Material Group = Soot
Option = Pure Substance
Thermodynamic State = Solid
PROPERTIES:
Option = General Material
EQUATION OF STATE:
Density = 2000 [kg m^-3]
Molar Mass = 12 [kg kmol^-1]
Option = Value
END
REFERENCE STATE:
Option = Automatic
END
ABSORPTION COEFFICIENT:
Absorption Coefficient = 0 [m^-1]
Option = Value
END
END
END
MATERIAL: Steel
Material Group = CHT Solids, Particle Solids
Option = Pure Substance
Thermodynamic State = Solid
PROPERTIES:
Option = General Material
EQUATION OF STATE:
Density = 7854 [kg m^-3]
Molar Mass = 55.85 [kg kmol^-1]
Option = Value
END
SPECIFIC HEAT CAPACITY:
Option = Value
Specific Heat Capacity = 4.34E+02 [J kg^-1 K^-1]
END
REFERENCE STATE:
Option = Specified Point
Reference Specific Enthalpy = 0 [J/kg]
Reference Specific Entropy = 0 [J/kg/K]
Reference Temperature = 25 [C]
END
THERMAL CONDUCTIVITY:
Option = Value
Thermal Conductivity = 60.5 [W m^-1 K^-1]
END
END
END
MATERIAL: Water
Material Description = Water (liquid)
Material Group = Water Data, Constant Property Liquids
Option = Pure Substance
Thermodynamic State = Liquid
PROPERTIES:
Option = General Material
EQUATION OF STATE:
Density = 997.0 [kg m^-3]
Molar Mass = 18.02 [kg kmol^-1]
Option = Value
END
SPECIFIC HEAT CAPACITY:
Option = Value
Specific Heat Capacity = 4181.7 [J kg^-1 K^-1]
Specific Heat Type = Constant Pressure
END
REFERENCE STATE:
Option = Specified Point
Reference Pressure = 1 [atm]
Reference Specific Enthalpy = 0.0 [J/kg]
Reference Specific Entropy = 0.0 [J/kg/K]
Reference Temperature = 25 [C]
END
DYNAMIC VISCOSITY:
Dynamic Viscosity = 8.899E-4 [kg m^-1 s^-1]
Option = Value
END
THERMAL CONDUCTIVITY:
Option = Value
Thermal Conductivity = 0.6069 [W m^-1 K^-1]
END
ABSORPTION COEFFICIENT:
Absorption Coefficient = 1.0 [m^-1]
Option = Value
END
SCATTERING COEFFICIENT:
Option = Value
Scattering Coefficient = 0.0 [m^-1]
END
REFRACTIVE INDEX:
Option = Value
Refractive Index = 1.0 [m m^-1]
END
THERMAL EXPANSIVITY:
Option = Value
Thermal Expansivity = 2.57E-04 [K^-1]
END
END
END
MATERIAL: Water Ideal Gas
Material Description = Water Vapour Ideal Gas (100 C and 1 atm)
Material Group = Calorically Perfect Ideal Gases, Water Data
Option = Pure Substance
Thermodynamic State = Gas
PROPERTIES:
Option = General Material
EQUATION OF STATE:
Molar Mass = 18.02 [kg kmol^-1]
Option = Ideal Gas
END
SPECIFIC HEAT CAPACITY:
Option = Value
Specific Heat Capacity = 2080.1 [J kg^-1 K^-1]
Specific Heat Type = Constant Pressure
END
REFERENCE STATE:
Option = Specified Point
Reference Pressure = 1.014 [bar]
Reference Specific Enthalpy = 0. [J/kg]
Reference Specific Entropy = 0. [J/kg/K]
Reference Temperature = 100 [C]
END
DYNAMIC VISCOSITY:
Dynamic Viscosity = 9.4E-06 [kg m^-1 s^-1]
Option = Value
END
THERMAL CONDUCTIVITY:
Option = Value
Thermal Conductivity = 193E-04 [W m^-1 K^-1]
END
ABSORPTION COEFFICIENT:
Absorption Coefficient = 1.0 [m^-1]
Option = Value
END
SCATTERING COEFFICIENT:
Option = Value
Scattering Coefficient = 0.0 [m^-1]
END
REFRACTIVE INDEX:
Option = Value
Refractive Index = 1.0 [m m^-1]
END
END
END
END
FLOW: Flow Analysis 1
SOLUTION UNITS:
Angle Units = [rad]
Length Units = [m]
Mass Units = [kg]
Solid Angle Units = [sr]
Temperature Units = [K]
Time Units = [s]
END
ANALYSIS TYPE:
Option = Transient
EXTERNAL SOLVER COUPLING:
Option = None
END
INITIAL TIME:
Option = Automatic with Value
Time = 0 [s]
END
TIME DURATION:
Option = Total Time
Total Time = 40 [s]
END
TIME STEPS:
Option = Timesteps
Timesteps = 0.01 [s]
END
END
DOMAIN: Default Domain
Coord Frame = Coord 0
Domain Type = Fluid
Location = B32
BOUNDARY: Bottom
Boundary Type = WALL
Location = Bottom
BOUNDARY CONDITIONS:
MASS AND MOMENTUM:
Option = No Slip Wall
END
WALL ROUGHNESS:
Option = Smooth Wall
END
END
END
BOUNDARY: Inlet_air
Boundary Type = WALL
Location = Inlet_air
BOUNDARY CONDITIONS:
MASS AND MOMENTUM:
Option = No Slip Wall
END
WALL ROUGHNESS:
Option = Smooth Wall
END
END
END
BOUNDARY: Inlet_water
Boundary Type = INLET
Location = Inlet_water
BOUNDARY CONDITIONS:
FLOW REGIME:
Option = Subsonic
END
MASS AND MOMENTUM:
Normal Speed = Uinlet
Option = Normal Speed
END
TURBULENCE:
Option = Medium Intensity and Eddy Viscosity Ratio
END
END
FLUID: Air
BOUNDARY CONDITIONS:
VOLUME FRACTION:
Option = Value
Volume Fraction = 0
END
END
END
FLUID: Water
BOUNDARY CONDITIONS:
VOLUME FRACTION:
Option = Value
Volume Fraction = 1
END
END
END
END
BOUNDARY: Outlet
Boundary Type = OUTLET
Location = Outlet
BOUNDARY CONDITIONS:
FLOW REGIME:
Option = Subsonic
END
MASS AND MOMENTUM:
Option = Average Static Pressure
Pressure Profile Blend = 0.05
Relative Pressure = PressureDist
END
PRESSURE AVERAGING:
Option = Average Over Whole Outlet
END
END
END
BOUNDARY: Sym1
Boundary Type = SYMMETRY
Location = Sym1
END
BOUNDARY: Sym2
Boundary Type = SYMMETRY
Location = Sym2
END
BOUNDARY: Top
Boundary Type = OPENING
Location = Top
BOUNDARY CONDITIONS:
FLOW DIRECTION:
Option = Normal to Boundary Condition
END
FLOW REGIME:
Option = Subsonic
END
MASS AND MOMENTUM:
Option = Opening Pressure and Direction
Relative Pressure = 0 [atm]
END
TURBULENCE:
Option = Medium Intensity and Eddy Viscosity Ratio
END
END
FLUID: Air
BOUNDARY CONDITIONS:
VOLUME FRACTION:
Option = Value
Volume Fraction = 1
END
END
END
FLUID: Water
BOUNDARY CONDITIONS:
VOLUME FRACTION:
Option = Value
Volume Fraction = 0
END
END
END
END
DOMAIN MODELS:
BUOYANCY MODEL:
Buoyancy Reference Density = 1.125 [kg m^-3]
Gravity X Component = 0 [m s^-2]
Gravity Y Component = -g
Gravity Z Component = 0 [m s^-2]
Option = Buoyant
BUOYANCY REFERENCE LOCATION:
Option = Automatic
END
END
DOMAIN MOTION:
Option = Stationary
END
MESH DEFORMATION:
Option = None
END
REFERENCE PRESSURE:
Reference Pressure = 1 [atm]
END
END
FLUID DEFINITION: Air
Material = Air at 25 C
Option = Material Library
MORPHOLOGY:
Option = Continuous Fluid
END
END
FLUID DEFINITION: Water
Material = Water
Option = Material Library
MORPHOLOGY:
Option = Continuous Fluid
END
END
FLUID MODELS:
COMBUSTION MODEL:
Option = None
END
FLUID: Air
FLUID BUOYANCY MODEL:
Option = Density Difference
END
END
FLUID: Water
FLUID BUOYANCY MODEL:
Option = Density Difference
END
END
HEAT TRANSFER MODEL:
Fluid Temperature = 25 [C]
Homogeneous Model = Off
Option = Isothermal
END
THERMAL RADIATION MODEL:
Option = None
END
TURBULENCE MODEL:
Option = k epsilon
BUOYANCY TURBULENCE:
Option = None
END
END
TURBULENT WALL FUNCTIONS:
Option = Scalable
END
END
FLUID PAIR: Air | Water
INTERPHASE TRANSFER MODEL:
Option = Free Surface
END
MASS TRANSFER:
Option = None
END
SURFACE TENSION MODEL:
Option = None
END
END
MULTIPHASE MODELS:
Homogeneous Model = On
FREE SURFACE MODEL:
Option = Standard
END
END
END
INITIALISATION:
Option = Automatic
FLUID: Air
INITIAL CONDITIONS:
VOLUME FRACTION:
Option = Automatic with Value
Volume Fraction = AirVF
END
END
END
FLUID: Water
INITIAL CONDITIONS:
VOLUME FRACTION:
Option = Automatic with Value
Volume Fraction = WaterVF
END
END
END
INITIAL CONDITIONS:
Velocity Type = Cartesian
CARTESIAN VELOCITY COMPONENTS:
Option = Automatic with Value
U = Uinlet
V = 0 [m s^-1]
W = 0 [m s^-1]
END
STATIC PRESSURE:
Option = Automatic with Value
Relative Pressure = PressureDist
END
TURBULENCE INITIAL CONDITIONS:
Option = Medium Intensity and Eddy Viscosity Ratio
END
END
END
OUTPUT CONTROL:
MONITOR OBJECTS:
MONITOR BALANCES:
Option = Full
END
MONITOR FORCES:
Option = Full
END
MONITOR PARTICLES:
Option = Full
END
MONITOR POINT: Monitor Point 1
Coord Frame = Coord 0
Expression Value = OutletElev
Option = Expression
END
MONITOR POINT: Monitor Point 2
Coord Frame = Coord 0
Expression Value = InletElev
Option = Expression
END
MONITOR RESIDUALS:
Option = Full
END
MONITOR TOTALS:
Option = Full
END
END
RESULTS:
File Compression Level = Default
Option = Standard
Output Equation Residuals = All
END
TRANSIENT RESULTS: Transient Results 1
File Compression Level = Default
Option = Standard
OUTPUT FREQUENCY:
Option = Time Interval
Time Interval = 0.1 [s]
END
END
END
SOLVER CONTROL:
Turbulence Numerics = First Order
ADVECTION SCHEME:
Option = High Resolution
END
CONVERGENCE CONTROL:
Maximum Number of Coefficient Loops = 25
Minimum Number of Coefficient Loops = 1
Timescale Control = Coefficient Loops
END
CONVERGENCE CRITERIA:
Residual Target = 0.00001
Residual Type = RMS
END
TRANSIENT SCHEME:
Option = Second Order Backward Euler
TIMESTEP INITIALISATION:
Option = Automatic
END
END
END
END
COMMAND FILE:
Version = 18.2
END
Attached Images
File Type: png Figure 1.png (7.8 KB, 19 views)
File Type: jpg Figure 2.jpg (31.4 KB, 19 views)
Ashkan Kashani is offline   Reply With Quote

Old   October 11, 2022, 01:07
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Where did you get the time step size of 0.1s from? I would use adaptive timestepping, homing in on 3-5 coeff loops pre iteration and with max and min time step sizes wide enough you do not hit them. Then CFX will find its own time step size.

In my experience in free surface models boundaries with variable pressure applied are problematic. If you can replace these with simpler boundaries that will make things a lot easier.
Ashkan Kashani likes this.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   October 13, 2022, 12:37
Default
  #3
Member
 
Ashkan Kashani
Join Date: Apr 2016
Posts: 46
Rep Power: 10
Ashkan Kashani is on a distinguished road
Thank you for the reply!
I took your advice. However, after many trials, I concluded that there is no way to establish a flat free surface anywhere along an open-channel using the multiphase model; no matter how far the inlet and outlet are moved away from the section of interest, there are always some sorts of waves that never stop to affect the region of interest. I am not sure if these waves are physical or numerical, but it seems it takes so many timesteps for them to die down if they do so at all.
That's why I decided to replace the multiphase model with a simpler single-phase model by treating the free surface as a free-slip wall condition, as shown in Figure 1 along with other boundary conditions. Figure 2 shows the experimental setup with which I am trying to compare the CFD model results for verification. As shown in Figure 2, pressure distribution underneath the block has been measured using manometer tubes in the lab.
Now here is my question:
Under what boundary conditions, are the results from the CFD model comparable to the experiments? What CFD output variable should be compared to the pressure values measured using manometer tubes in the lab, as shown in Figure 2?
Attached Images
File Type: png Figure 1.png (17.3 KB, 16 views)
File Type: jpg Figure 2.jpg (76.7 KB, 15 views)
Ashkan Kashani is offline   Reply With Quote

Old   October 13, 2022, 22:36
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Quote:
Under what boundary conditions, are the results from the CFD model comparable to the experiments?
When the CFD model, including the boundary conditions, are accurate enough representations of the actual device then your results will be accurate.

This is too broad a question to be useful. It is a bit like asking a builder "How do you build a house?"

Quote:
What CFD output variable should be compared to the pressure values measured using manometer tubes in the lab, as shown in Figure 2?
You could look at the pressure at your manometer points.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues on the simulation of high-speed compressible flow within turbomachinery dowlee OpenFOAM Running, Solving & CFD 11 August 6, 2021 07:40
Multiphase VOF - Flow in a Channel harsha28 Fluent Multiphase 1 July 8, 2020 17:39
Interaction between open channel flow and porous flow narendrapatel111 ANSYS 0 June 8, 2020 12:42
PEM fuel cell simulation pchoopanya Mesh Generation & Pre-Processing 1 March 1, 2016 00:56
fluid flow fundas ram Main CFD Forum 5 June 17, 2000 22:31


All times are GMT -4. The time now is 09:50.