CFD Software Overview Comparison, Limitations And User .

Transcription

CFD software overviewcomparison, limitations anduser interfacesDaniel LegendreIntroduction to CFDTurku, 19.04.2016Åbo Akademi University – Thermal and Flow Engineering Laboratory19.04.20151

Some useful software Comsol multiphysics 5.2 Fluent/CFX (Ansys Workbench) Open Foam (Open source CFD)Åbo Akademi University – Thermal and Flow Engineering Laboratory2

Ansys Workbench: Fluent 17https://support.ansys.com/Åbo Akademi University – Thermal and Flow Engineering Laboratory3

Ansys Workbench: Fluent 17https://support.ansys.com/Åbo Akademi University – Thermal and Flow Engineering Laboratory4

Test Case Mixer tankMixer as source termsSteady solutionÅbo Akademi University – Thermal and Flow Engineering Laboratory5

Comsolhttp://www.comsol.com/support/Åbo Akademi University – Thermal and Flow Engineering Laboratory6

Mixing towerMixer rotating MeshTime depending solutionÅbo Akademi University – Thermal and Flow Engineering Laboratory7

Open source CFD: OpenFOAMhttp://www.openfoam.org/version2.3.1/Åbo Akademi University – Thermal and Flow Engineering Laboratory8

OpenFOAM Top-Level Codesolve(fvm::Laplacian(p) ‐ fvc::div(U));dU dt*(‐fvc::div(phi, U) nu*fvc::Laplacian(U));U U dU;U.correctBoundaryConditions();Åbo Akademi University – Thermal and Flow Engineering Laboratory9

The dynamicMeshDict dictionaryOpen FOAMÅbo Akademi University – Thermal and Flow Engineering Laboratory10

Why use User Define Functions? Commercial software is a general-purposetool and cannot anticipate all users needs. Addition of new physical models for academicresearch or customer proprietary physics. Customization of boundary conditions.Åbo Akademi University – Thermal and Flow Engineering Laboratory11

LimitationsUDFs have the following limitations: Although the UDF capability in ANSYS FLUENT can address a wide range ofapplications, it is not possible to address every application using UDFs. Not all solutionvariables or ANSYS FLUENT models can be accessed by UDFs. If you are unsurewhether a particular problem can be handled using a UDF, contact your technicalsupport engineer for assistance.UDFs use and return values specified in SI units. You may need to update your UDF when you use a new version of ANSYS FLUENT .* // UDF Manual // 1. Overview of User-Defined Functions (UDFs) // 1.2.Limitations. Ansys 14.5 User Manual.Åbo Akademi University – Thermal and Flow Engineering Laboratory12

RECOMMENDATIONS ON GRIDS The key recommendation is to ensure smooth grids, avoiding abrupt changes in grid size or shape, as thiscan lead to a significant loss of accuracy. Hence take good care to:– Define the computational domain, in order to minimize the influence and interactions between theflow and the far-field conditions. In particular, Place inlet and outlet boundaries as far away aspossible from the region of interest. In particular, if uniform far-field conditions are imposed, youshould ensure that the boundary is not in a region where the flow may still vary significantly.– Avoid inlet or outlet boundaries in regions of strong geometrical changes or in regions ofrecirculation.Avoid jumps in grid density or in grid size.Avoid highly distorted cells or small grid angles.Ensure that the grid stretching is continuous.Avoid unstructured tetrahedral meshes in boundary layer regions.Refine the grids in regions with high gradients, such as boundary layers, leading edges of airfoils and anyregion where large changes in flow properties might occur.Make sure that the number of points in the boundary layers is sufficient for the expected accuracy. Avoidless than 10 points over the inner part of the boundary layer thickness.Monitor the grid quality by adequate mesh parameters, available in most of the grid generators, such asaspect ratio, internal angle, concavity, skewness, negative volume.*Source: Hirsch,C. Numerical computation of internal & external flows. SecondEdition 2007. Butterworth-Heinemann.Åbo Akademi University – Thermal and Flow Engineering Laboratory13

RECOMMENDATIONS ON SOLUTION ASSESSMENT Check very carefully the selected boundary conditions for correctness and compatibility with thephysics of the flow you are modeling.Verify all the numerical settings and parameters, before launching the CFD run.Verify that your initial solution is acceptable for the problem to be solved.Monitor the convergence to ensure that you reach machine accuracy. It is recommended to monitor,in addition to the residuals, the convergence of representative quantities of your problem, such as adrag force or coefficient, a velocity, temperature or pressure at selected points in the flow domain.Look carefully at the behavior of the residual convergence curve in function of number of iterations. Ifthe behavior is oscillatory, or if the residual does not converge to machine accuracy by showing a limitcycle at a certain level of residual reduction, it tells you that some inaccuracy affects your solutionprocess.Check, whenever possible, the grid dependence of the solution by comparing the results obtained ondifferent grid sizes.Some quantities are more sensitive than others to error sources. Pressure curves are less sensitivethan shear stresses, which in turn are less sensitive than temperature gradients or heat fluxes, whichrequire finer grids for a given accuracy level.Reduce the values of parameters controlling convergence, such as the CFL number or some underrelaxation parameter, when available.*Source: Hirsch,C. Numerical computation of internal & external flows. Second Edition 2007.Butterworth-Heinemann.Åbo Akademi University – Thermal and Flow Engineering Laboratory14

Comparison TableAnsys Comsol OpenFOAM Graphic UserInterface (GUI)Simple to useSimple to useNO GUI. UnixTerminal windowMeshingRelative simple forstandard applicationsRelative simple forstandard applicationsNeedsimplementation bythe userPersonalization of thecodeUDF’s C , pythonUDF’s Java and matlabDirect modificationsto the code. C ,python.Solver stabilityVery stable andreliable solutionsStable and reliablesolutionsRequires userknowledge innumerical methodsProgramming skillsWith UDF’s C andpython. For the GUInot requiredBasic even with UDF’s. C and python.For the GUI notrequiredSupportSupport teamSupport teamÅbo Akademi University – Thermal and Flow Engineering LaboratoryNon supported. Opensource15

variables or ANSYS FLUENT models can be accessed by UDFs. If you are unsure whether a particular problem can be handled using a UDF, contact your technical support engineer for assistance. UDFs use and return values specified in SI units. You may need to update your UDF when you use a new version of ANSYS FLUENT.