Transcription of Presentation slides for the course CFD with …
1 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsPresentation slidesfor the courseCFD with opensource software 2015 Sebastian Kohlst adtApplied Mechanics/Fluid Dynamics,Chalmers University of Technology,Gothenburg, Sweden2015-12-08 Sebastian Kohlst adtModeling hpdc2015-12-081 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsPrincipal setup of a high-pressure die casterWhat is high-pressure die casting?clampingunitejector unittie barplungerhydraulicaggregatefixedplatemo vingplatecasting unitlocking unitFigure : The layout and components of a high-pressure die casting machineaccording to DIN Kohlst adtModeling hpdc2015-12-082 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsThree process phases of high-pressure die castingThe three phases in high-pressure die casting (1)Figure : Phase one: Kohlst adtModeling hpdc2015-12-083 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsThree process phases of high-pressure die castingThe three phases in high-pressure die casting (2)Figure : Phase two: Kohlst adtModeling hpdc2015-12-084 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsThree process phases of high-pressure die castingThe three phases in high-pressure die casting (3)Figure : Phase three: Kohlst adtModeling hpdc2015-12-085 / 28 introduction .
2 Hpdc basicsGenerating the meshCase setupRunning the caseResultsFocus of tutorial: CFD in shot sleeveThe fluid mechanics processes in the shot sleeveFigure : Impact of increasing plunger propagation. The velocity increases fromthe left to the right Kohlst adtModeling hpdc2015-12-086 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsOverviewWays to create mesh with open source softwareblockMesh: included in openFOAMR . Usable for very simple spread in academia. Of limited usability forindustrial : Salome comes along with meshing tools. They are quiteintuitively usable, however can not entirely compete withcommercial : included in openFOAMR . Requires however some workwith the .stl file mostly in additional pre-processingsoftware in order to be appropriately Kohlst adtModeling hpdc2015-12-087 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsOverviewWays to create mesh with open source software author srecommendationThe author of this tutorial found out that for industrial applications withcomplex shapes the combination of pre-processing the (stl-) geometry inSalome and then applying snappyHexMesh is for the majority of cases thebest option.
3 Unless the user has access to proprietary software such Kohlst adtModeling hpdc2015-12-088 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsSalome tutorialA brief tutorial in SalomeOpen Salome, please!We will now create a geometry together!Sebastian Kohlst adtModeling hpdc2015-12-089 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsGenerating the mesh for the tutorialEnvisioned geometry/mesh for the tutorialThe aim is to create a mesh like the one shown underneath for thetutorial. How would you proceed?Sebastian Kohlst adtModeling hpdc2015-12-0810 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsGenerating the mesh for the tutorialEnvisioned geometry/mesh for the tutorialThe author did it by using his self-developed template of theblockMeshDict for boxes. Some excerpts of it will be shown in thefollowing slides and beneath the -30;minYCor -30;minZCor -300; //This is the first paragraph mymaxXCor 30; //blockMeshDict starts withmaxYCor 30; // I do convert the values to meters by 1e-3maxZCor -20;Sebastian Kohlst adtModeling hpdc2015-12-0811 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsGenerating the mesh for the tutorialHow to create the geometry/mesh for the tutorial (1)The vertices only use the priorly defined (($minXCor $minYCor $minZCor)($maxXCor $minYCor $minZCor)($maxXCor $maxYCor $minZCor)($minXCor $maxYCor $minZCor)($minXCor $minYCor $maxZCor)($maxXCor $minYCor $maxZCor)($maxXCor $maxYCor $maxZCor)($minXCor $maxYCor $maxZCor)).
4 Sebastian Kohlst adtModeling hpdc2015-12-0812 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsGenerating the mesh for the tutorialHow to create the geometry/mesh for the tutorialThe faces of the so created blocks can be easily assigned to the patchesbecause they were previously assigned to XY, XZ, YZ (slipWalls{type wall;faces((3 7 6 2) //maxXZBlock0(1 5 4 0) //minXZBlock0);}Sebastian Kohlst adtModeling hpdc2015-12-0813 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsGenerating the mesh for the tutorialEnvisioned geometry/mesh for the tutorialThe faces of the so created blocks can be easily assigned to the patchesbecause they were previously assigned to XY, XZ, YZ {type wall;faces((9 13 12 8) //minXZBlock1(12 13 14 15) //maxXYBlock1(16 19 18 17) //minXYBlock2(20 21 22 23) //maxXYBlock2);The same is done for movingWalls, outlet and frontAndBack (emptypatches in 2D case).Sebastian Kohlst adtModeling hpdc2015-12-0814 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsGenerating the mesh for the tutorialEnvisioned geometry/mesh for the tutorialIn the end the patches that form internal borders are stitched is necessary because of point Remember: This only works if in both cases the master box// (the box to which the master patch belongs) stays the same.)}
5 ((internalBorderBlock10 internalBorderBlock01)(internalBorderBlo ck12 internalBorderBlock21));Sebastian Kohlst adtModeling hpdc2015-12-0815 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsHow to make the mesh movingWhich solvers handle moving meshes?Moving meshes in openFOAMR Solvers handling moving meshes are distinguished from solvers thatdo not by the expression DyM in their name, additionally require the dictionarydynamicMeshDictthis dictionary is located in$CASE_DIR/constant/dynamicMeshDictthe specialty of this DyM-solver family is that they inside call anothersolver that solves for mesh motionan additional library has to be included indynamicMeshDictthe mesh solution can be looked at independently from the flowsolution by simply typingmoveDynamicMeshinto a terminal in thecase folderan example of the dynamicMesh I used will be given on the followingpagesSebastian Kohlst adtModeling hpdc2015-12-0816 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsHow to make the mesh movingThe layout of the dynamicMeshDictThe example of thedynamicMeshDictI used.
6 Particularly difficult tofigure out was the line that includes themotionSolverLibsasopenFOAMR does not tell you it needs it and which options are *openFOAM header */..dynamicFvMesh dynamicMotionSolverFvMesh;motionSolverLi bs ( " " );solver velocityComponentLaplacian z;velocityComponentLaplacianCoeffs{compo nent z;diffusivity directional ( 0 200 1 );}Sebastian Kohlst adtModeling hpdc2015-12-0817 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsHow to make the mesh movingAvailable dynamicFvMesh typesAvailable dynamicMesh types in openFOAMR You can see them byapplying the banana (dynamicInkJetFvMeshdynamicMotionSolverF vMeshdynamicRefineFvMeshmultiSolidBodyMo tionFvMeshsolidBodyMotionFvMeshstaticFvM esh)Sebastian Kohlst adtModeling hpdc2015-12-0818 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsHow to make the mesh movingSelection the motion solverWhat to do if the motion solver table is missing?
7 --> FOAM FATAL ERROR:solver table is emptyFrom function motionSolver::New(const polyMesh& mesh)in file motionSolver/ at line exitingYou are probably missing the linemotionSolverLibs ( " " );inside your Kohlst adtModeling hpdc2015-12-0819 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsHow to make the mesh movingAvailable solvers from the libraryWhich solvers can you select?Valid solver types are:7(displacementComponentLaplaciandisp lacementInterpolationdisplacementLaplaci andisplacementLayeredMotiondisplacementS BRS tressvelocityComponentLaplacianvelocityL aplacian)Sebastian Kohlst adtModeling hpdc2015-12-0820 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsMesh motionRunning the mesh motionFor only calculating the mesh motion one has to typeblockMesh > > ¶Foamto a terminal window in which the case directory is Kohlst adtModeling hpdc2015-12-0821 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsCFD solutionComputing the flowThe commands for running the case are fairly similar to all otheropenFOAMR cases.
8 One opens a terminal sources thebashrcandnavigates to the case directory. TypingblockMesh > 0 0 > > ¶Foamwill run the case. The results can then be viewed Kohlst adtModeling hpdc2015-12-0822 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsMesh motionResults from moveDynamicMesh (1)Something like this should appear in ParaView after you executed thecommandmoveDynamicMeshin the tutorial s case t = 0 Sebastian Kohlst adtModeling hpdc2015-12-0823 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsMesh motionResults from moveDynamicMesh (2)Something like this should appear in ParaView after you executed thecommandmoveDynamicMeshin the tutorial s case t = Kohlst adtModeling hpdc2015-12-0824 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsMesh motionResults from moveDynamicMesh (3)Something like this should appear in ParaView after you executed thecommandmoveDynamicMeshin the tutorial s case t = Kohlst adtModeling hpdc2015-12-0825 / 28 introduction .
9 Hpdc basicsGenerating the meshCase setupRunning the caseResultsCFD solutionResults from compressibleInterDyMFoam (1)Something like this should appear in ParaView after you executed thecommands as stated above in the tutorial s case t = 0 Sebastian Kohlst adtModeling hpdc2015-12-0826 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsCFD solutionResults from compressibleInterDyMFoam (2)Something like this should appear in ParaView after you executed thecommands as stated above in the tutorial s case t = Kohlst adtModeling hpdc2015-12-0827 / 28 introduction : hpdc basicsGenerating the meshCase setupRunning the caseResultsCFD solutionResults from compressibleInterDyMFoam (3)Something like this should appear in ParaView after you executed thecommands as stated above in the tutorial s case t = Kohlst adtModeling hpdc2015-12-0828 / 28