1 / 40

Solution Techniques

Solution Techniques. What CFD packages do. Aim is to solve, numerically, the equations of motion (continuity and motion) for a fluid for a given flow geometry: Plus transport equations for any additional models such as heat transfer and/or turbulence models. Transport equations.

shania
Download Presentation

Solution Techniques

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Solution Techniques

  2. What CFD packages do • Aim is to solve, numerically, the equations of motion (continuity and motion) for a fluid for a given flow geometry: • Plus transport equations for any additional models such as heat transfer and/or turbulence models

  3. Transport equations • These are the modelling basis for all engineering processes involving momentum, mass or heat transfer • They have a general form. • However the notation used in engineering literature varies. Most references use some shorthand form because the full equation set (particularly the momentum equation) is tedious to write

  4. For transport of a scalar quantity  : • Full notation (pain-full) For a 3d problem there will be 3 PDEs too! • Cartesian tensor notation (Fluent and general CFD literature) summation over co-ordinates implicit. Multiple PDEs implicit too

  5. For transport of a scalar quantity  : • Vector notation (BS&L and also other CFD literature) • integral form (over a control volume and used in Fluent documentation)

  6. Transport equations • Express the conservation relationship for intensive properties (T, c, u) in terms of accumulation, advection, diffusion, generation and destruction • Since the important adjective is “conservation”, this is also one important criteria of the solution • they are also known as convection diffusion equations

  7. Three questions • What does the time derivative imply? • What process does a first order spatial derivative represent? • What process does a 2nd order spatial derivative represent?

  8. but • Transport equations are generally second order non linear differential equations for which a general analytical solution is not known • so we usually have to solve them numerically • however analytical solutions exist for particular simplified problems ( BS&L) • Steady 1d flow has an analytical solution

  9. An aside... • Some parts of a CFD flow problem may approximate conditions where an analytical solution of the equations of motion does exist or can be approximated. • Such an exact solution can be used for validation. I will use this later in this lecture •  is a scalar. The momentum equation uses u which is a vector.

  10. Numerical Solution of Transport Equations • Numerical solution involves discretizatng the transport equations in time and space (along a grid) • Discretization can be viewed as a mathematical operator which transforms the transport equation (a PDE) into a set of coupled ODE’s which express conversation over the set of finite volumes as defined by the grid • This involves replacing spatial derivatives by algebraic approximations based on grid values in the same and adjacent grid volumes

  11. Finite differences • This approach uses numerical approximations to the spatial derivatives. Example is a finite difference approximation to a 1st order derivative at a mesh point

  12. Finite Volumes • Integrates the transport equation over a finite volume defined by a grid element and then assumes a mean value of v exists in the volume • This integration means that any first order spatial derivatives are replaced by fluxes across the boundary. (why?) This flux is calculated based on a value of fat the boundary • But we only know an average value of vfor each volume, so fmust be calculated by an approximation

  13. Finite Volumes • Second order derivatives are integrated to first order derivatives. • These have to be approximated by finite differences • The time derivative still appears in the discretized equations so the operator Dis results in a set of coupled ordinary differential equations in time

  14. Discretization is an approximation • And an approximation will introduce errors • These errors will introduce oscillatory behaviour to wave fronts and false diffusion • There is a large body of literature on techniques which aim to minimise these problems • A good starting point is Fletcher

  15. Oscillatory behaviour at wave fronts • Fletcher, 1, p314

  16. Numerical or False Diffusion • It creates most problems in flow simulations where real diffusion is small. Why? Fletcher 1 p 285

  17. Fluent’s Finite Volume approach • Fluent uses the finite volume approach to discretization • The transport equations (PDE’s) are then integrated over each finite volume as defined by the grid and an average value of v is assumed over the volume. (Equivalent to a well mixed assumption)

  18. Discretization • However since the boundary of each finite volume consists of a finite set of flat faces of known area, the discretized equations become: • To solve these equationswe need the values of fat each face

  19. Calculation of f by Upwinding • Upwinding calculates the value of f based on vin cells upstream of the face f • 1st order upwinding proposes that f is equal to the value of vin the cell that adjoins f upstream • 2nd order upwinding calculates f based on a Taylor series expansion of the upstream cell centered-solution about the cell centroid:

  20. Calculation of f by Upwinding • And • 1st order upwinding in 1d is equivalent to the 2 point finite difference equation using values upstream of the grid point j:

  21. Power law and Quick • Power Law scheme uses an analytical solution to the steady 1d convection diffusion equation - See Ch 17 Fluent documentation • Quick Scheme uses a weighted average of second order upwinding and central differencing • The higher order schemes are more accurate but this can be at the expense of numerical stability

  22. Which is best? • 1st order upwinding works best in problems which are dominated by real diffusion and will be accurate where the real diffusion exceeds the numerical diffusion. Also useful as a starting point in solution • Most CFD problems are dominated by advection (flow) and hence higher order schemes are probably going to be the most accurate. So you will probably use at least 2nd order upwinding. • Many problems will converge well with the higher order schemes anyway • However this is also very dependent on grid quality. The higher order schemes will give the most improvement in accuracy on poorer quality grids.

  23. For Example: Laminar falling film • Laminar flow of a falling film of water on flat plate • Consider a case where the plate is nearly horizontal, the film depth is very small (say 10mm) and the plate is very long (say 4m) and the plate is very wide. • The plate is wide enough that we treat the flow as a 2d problem in length zand water depth x • Since the plate is very long, a point in z will be reached where the flow will be fully developed and we can reasonably assume this will be near the exit

  24. Laminar Falling Film

  25. Laminar falling film • In the fully developed region any spatial derivatives along the plate (in z) are zero • With this simplification we can derive an analytical solution for the velocity profile from the momentum equation, provided that we know the film thickness and the angle of inclination (See BS&L pp38 -39):

  26. Laminar Falling Film • This velocity profile has been verified experimentally • Note that this is a laminar boundary layer problem! • Here are Fluent’s predictions of the z velocity profile vs height x from the plate near the film surface for a 10mm thick film along a 4m long plate that is nearly horizontal at a point which is near the exit from the flow:

  27. Fluent Prediction using a tri-paved grid

  28. Fluent prediction with mapped hex grid

  29. Laminar Falling Film - Conclusions • For a mapped hex mesh all discretisation techniques give much the same answer for the velocity profile • For a triangular paved mesh the higher order schemes show a definite improvement

  30. If you want to read more • Ch 17 of the Fluent documentation • See some of the references at the end of the Fluent documentation • Fletcher C. A.J. “Compuational Techniques for Fluid Dynamics” Volumes 1 and II, Springer 1991

  31. Solvers • Discretisation results in a set of coupled ODEs in time • The unsteady solvers in Fluent integrate these ODE’s in time using a Kutta Merson algorithm • The steady solvers assume that the time derivative to zero. The result is a set of non-linear simultaneous equations. These are solved iteratively

  32. Solvers - Unsteady or Steady? • Remember that flow through the tap is a steady flow problem but filling the sink is not. • But the sink may be filled to overflowing and the flow onto the floor appears to be constant. Is this a steady flow? • What if there are waves on the surface of the water which propagate out from the point of impact of the water stream from the tap? • Will a steady solver be able to get a steady solution for this sort of behaviour? Why or why not?

  33. Solvers - Steady or Unsteady? • Your problem may actually have a periodic characteristic that you may not be aware of. You may be trying to get a steady state solution and this may be why you aren’t getting convergence • Consider flow in a slow moving river or stream. This is actually turbulent flow and is characterised by eddies which well up to the surface. • Even though the water flow down the stream is constant , is this a steady flow?

  34. Solvers - Steady or Unsteady? • Turbulence is intrinsically a dynamic phenomena. It might be more chaotic than periodic but the flow domain contain effects where the velocity obviously varies in time • A steady solution therefore only exists in a time averaged sense for turbulent flows. We will discuss this in a later lecture • Large Eddy Simulation (and DNS) must use the unsteady solver because they resolve the path of these eddies • k-e, RSM can use the steady solver but this doesn’t mean you should be using it.

  35. Solvers - Steady • The simulation might have a steady solution but you might still have to integrate in time from an initial condition to get using the unsteady solver to get to the steady state • This situation will probably arise in multiphase flow problems. Particularly where the simulation is tracking a phase boundary

  36. Fluent’s Unsteady Solver • The unsteady solver integrates the ODE’s using a Kutta Merson integrator • If you have a small number of small grid points, this may introduce stiffness into the equation set • See Johnson and Reiss, Numerical Analysis, Addison Wesley, 1982 for a discussion of the effects of stiffness

  37. Fluent’s Steady Solvers • With the steady solvers the time derivative is assumed to be zero • The ODE’s then reduce to a set of coupled non linear simultaneous equations • These are linearised. This can be by an implicit of explicit form

  38. Fluent’s Steady Solvers • Segregated Solver • The default option • solves the momentum, continuity and then other transport equations sequentially • because of this the solver must iterate until the solution is converged • Coupled Solver • Solves the momentum, continuity, energy and species transport as one equation set • however the equations are still non linear and the solution is still iterative

  39. What does this mean? • The various steady solvers and the linearization techniques affect convergence and stability in particular problems • The various solvers will however work across a variety of problems. These will be discussed in detail later

  40. Under-relaxation • This is a technique which controls the change in a variable during iteration • It is the main technique by which the solver is stabilised • Reducing the under-relaxation factor  will stabilise the solver at the expense of slowing the rate of convergence

More Related