sliceJasakOpenFOAM Opensource and CFD_第1页
sliceJasakOpenFOAM Opensource and CFD_第2页
sliceJasakOpenFOAM Opensource and CFD_第3页
sliceJasakOpenFOAM Opensource and CFD_第4页
sliceJasakOpenFOAM Opensource and CFD_第5页
已阅读5页,还剩24页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

OpenFOAM Opensource and CFD Andrew King Department of Mechanical Engineering Curtin University Outline What is Opensource Software OpenFOAM Overview Utilities, Libraries and Solvers Data Formats The CFD toolchain Solid Modelling (Geometry) Meshing Solution Postprocessing Outline Examples Lid driven Cavity Buoyancy driven flow Free Surface Flows Dynamic Meshing Fluid Structure Interaction Opensource what is it? Opensource Software has source code freely available. permits users to study, change, and improve the code. allows redistribution in modified or unmodified form. promotes development in a public, collaborative manner. Examples Apache (web server) runs 60% of the internet Linux Operating System based on UNIX. Firefox Standards Compliant Web Browser .many more . And of course Open source CFD OpenFOAM - Overview OpenFOAM stands for: Open Field Operations And Manipulation Consists of a library of efficient CFD related C+ modules. These can be combined together to create solvers utilities (for example pre/post-processing, mesh checking, manipulation, conversion, etc.) Or, additional functionality can be introduced through new libraries or modules OpenFOAM - Overview So far modules, libraries and applications are available for the following tasks SOLVERS Basic CFD Incompressible flows Compressible flows Multiphase flows DNS and LES Combustion Heat transfer Electromagnetics Solid dynamics Finance UTILITIES Pre-processing The FoamX case manager Other pre-processing utilities Post-processing The paraFoam post-processor Third-party post-processing Other post-processing utilities Mesh processing Mesh generation Mesh converters Mesh manipulation LIBRARIES Model libraries Turbulence Large-eddy simulation (LES) Transport models Thermophysical models Lagrangian particle tracking Chemical kinetics Other features Linear system solvers ODE system solvers Parallel computing Mesh motion Numerical method More details of solvers later. OpenFOAM - Overview Data Formats Open foam cases consist of a directory, and subdirectories with specific tasks. Top Level Case Directory Initial Conditions Timestep Data Constant Data (fluid properties, etc) Simulation controls (disc. schemes, solvers, Timestep size, write controls, . ) Exported Data (ie. VTK format) Mesh (also in each TS dir for moving meshes) OpenFOAM - Overview A GUI (FoamX) allows easy access to the files, to control all facets, and run simulations. FoamX GUI OpenFOAM - Overview Alternatively direct access to files is possible Boundary and initial conditions are set in 0 directory. file ./cavity/0/U Velocities Note that OpenFOAM keeps track of dimensions and type (ie scalar, vector, tensor) and checks these when compiling a solver. Initial internal field values boundary type and value (where required) OpenFOAM - Overview file ./cavity/0/p Pressures dimensions (ie m2/s2 = N/m2) Initial internal field values boundary type (zero normal gradient, no value reqd) pressure is a scalar OpenFOAM - Overview Postprocessing Quantitative data available using utility applications, ie. sampleSurface patchAverage patchIntegrate wallHeatFlux checkYPlus wallGradU etc. Or from paraFoam graphical utility OpenFOAM - Overview ParaFoam ParaFoam imports fields in general formats and filters are applied to construct contours, graphs, etc. Grid visualisation (above) and overlay of pressure contours, velocity vectors and grid (right) Opensource CFD Toolchain OpenFOAM provides the solver (and a bit more), however the CFD tool chain is more than this. It is possible to use an entirely OSS toolchain, or a combination of commercial and OSS tools. Geometry Mesh Solver Postprocessing Opensource CFD Toolchain GeometryMeshingSolverPostprocessing Blender BRL-CAD SolidWorks ANSYS Mesh Gambit BlockMesh netgen gmsh OpenFOAM Utilities Paraview OpenDX ANSYS FLUENT TecPlot OtherOtherOther OpenFOAMOpensourceCommercial Customisation Due to opensource code, customisation is easy. for solvers, a typical flow equation can be descibed as follows. (ie momentum) fvVectorMatrix UEqn ( fvm:ddt(U) + fvm:div(phi, U) - fvm:laplacian(nu, U) ); solve(UEqn = -fvc:grad(p); Unsteady term Momentum term Diffusion term Pressure gradient New solvers can be created by modifying existing solvers, for example to add scalar transport, equation is similar to above. OpenFOAM - Overview In combination, the above utilities and solvers are at least as powerful as the commercial offerings. (Fluent, ANSYS CFX, StarCD, etc) though some initial investment in learning is required. OpenFOAM - Examples Lid driven cavity Standard test case, bottom and side walls are no-slip and stationary, top wall is driven at 1 m/s. Flow is assumed incompressible, isothermal and laminar. Solution obtained using the standard icoFoam solver OpenFOAM - Examples Mesh generation Mesh for this problem is created using the blockMesh utility Geometry, grid spacing and labels for boundaries (patches) are all specified in a blockMeshDict. Running the utility gives a mesh as shown. OpenFOAM - Examples Boundary Conditions Set in 0/U fixedWalls type fixedValue value uniform (0 0 0) movingWall type fixedValue value uniform (1 0 0) Set in 0/p fixedWalls type zeroGradient movingWall type zeroGradient movingWall fixedWalls OpenFOAM - Examples Solution run using icoFoam Typical Output (at each timestep) Time = 0.8 Mean and max Courant Numbers = 0.0500943 0.42312 BICCG: Solving for Ux, Initial residual = 8.9862e-09, Final residual = 8.9862e-09, No Iterations 0 BICCG: Solving for Uy, Initial residual = 2.28622e-08, Final residual = 2.28622e-08, No Iterations 0 ICCG: Solving for p, Initial residual = 1.02719e-06, Final residual = 1.61421e-07, No Iterations 1 time step continuity errors : sum local = 1.01957e-09, global = -1.23457e-19, cumulative = -1.32236e-18 ICCG: Solving for p, Initial residual = 3.48287e-07, Final residual = 3.48287e-07, No Iterations 0 time step continuity errors : sum local = 1.62239e-09, global = -5.22778e-20, cumulative = -1.37464e-18 ExecutionTime = 1.73 s ClockTime = 3 s End. OpenFOAM - Examples Results From paraview graphical results can be obtained. Stream Lines Pressure OpenFOAM - Examples Buoyancy driven flow Isothermal sphere, in walled enclose open at top and bottom Flow is assumed incompressible and laminar with boussinesq assumption for buoyant forces. Solution obtained using contributed boussinesqBuoyantFoam solver Walls Open base Sphere OpenFOAM - Examples Buoyancy driven flow Temperature Field after 0.3s, sphere coloured by wall heat flux Velocity Vector Field OpenFOAM - Examples Free-surface flow solid cube, 50% suspended in free-stream channel flow. Flow is assumed incompressible and laminar w

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论