|
[Sponsors] |
Problems with mass flow rate, pressure and velocity average values |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 12, 2016, 10:49 |
Problems with mass flow rate, pressure and velocity average values
|
#1 |
New Member
Lucas
Join Date: Aug 2016
Location: Netherland
Posts: 8
Rep Power: 10 |
Hi people, I'm new in OpenFoam and a I have some problems, I want to know the pressure and velocity average, and the mass flow rate in a surface. This surface is an stl file, and I made it a faceZone using snappyHexMesh.
Code:
// Which of the steps to run castellatedMesh true; // make basic mesh ? snap true; // decide to snap back to surface ? addLayers false; // decide to add viscous layers ? geometry // Load in STL files here { TuboVenture.stl { type triSurfaceMesh; name venture; } areaSaidaVenture.stl { type triSurfaceMesh; name saida; } areaEntradaVenture.stl { type triSurfaceMesh; name entrada; } }; castellatedMeshControls { maxLocalCells 2500000; //max cells per CPU core maxGlobalCells 10000000; //max cells to use before mesh deletion step minRefinementCells 10; //was 0 - zero means no bad cells are allowed during refinement stages maxLoadUnbalance 0.10; nCellsBetweenLevels 4; // expansion factor between each high & low refinement zone features // taken from STL from each .eMesh file created by "SurfaceFeatureExtract" command ( { file "TuboVenture.eMesh"; level 5; } { file "areaEntradaVenture.eMesh"; level 5; } { file "areaSaidaVenture.eMesh"; level 5; } ); refinementSurfaces // Surface-wise min and max refinement level { venture { level (2 3); patchInfo { type wall; } } saida { level (1 2); faceZone saidaV; cellZone saidaV; cellZoneInside inside; boundary saidaV; } entrada { level (1 2); faceZone entradaV; cellZone entradaV; cellZoneInside inside; boundary entradaV; } } resolveFeatureAngle 30; // Resolve sharp angles // Default 30 refinementRegions // In descending levels of fine-ness { } locationInMesh (-9.12 -2.11 -2.14); //to decide which side of mesh to keep ** allowFreeStandingZoneFaces true; } // Settings for the snapping. snapControls { nSmoothPatch 5; tolerance 4.0; nSolveIter 150; nRelaxIter 8; nFeatureSnapIter 10; // default is 10 // New settings from openfoam 2.2 onwards for SHMesh implicitFeatureSnap false; // default is false - detects without doing surfaceFeatureExtract explicitFeatureSnap true; // default is true multiRegionFeatureSnap true; // deafault is false - detects features between multiple surfaces } // Settings for the layer addition. addLayersControls //add the PATCH names from inside the STL file so STLpatchName_insideSTLName { relativeSizes false; // was true layers { visc_main {nSurfaceLayers 3;} // was 3 visc_refine_1 {nSurfaceLayers 3;} // was 3 visc_refine_2 {nSurfaceLayers 3;} // was 3 } expansionRatio 1.3; finalLayerThickness 0.00016; //was 0.00016 minThickness 0.00008; //was 0.00008 nGrow 0; // was 1 // Advanced settings featureAngle 80; // was 70 //- When not to extrude surface. 0 is flat, 90 is right angle. nRelaxIter 3; //- Max# of snapping relaxation iter. Should stop before upon reaching a correct mesh. nSmoothSurfaceNormals 1; // Number of smoothing iterations of surface normals nSmoothNormals 3; // Number of smoothing iterations of interior mesh movement direction nSmoothThickness 10; // Smooth layer thickness over surface patches maxFaceThicknessRatio 0.5; // Stop layer growth on highly warped cells maxThicknessToMedialRatio 0.3; // Reduce layer growth where ratio thickness to medial distance is large minMedianAxisAngle 130; // Angle used to pick up medial axis points nBufferCellsNoExtrude 0; // Create buffer region for new layer terminations nLayerIter 50; // Overall max number of layer addition iterations } // Generic mesh quality settings. At any undoable phase these determine // where to undo. meshQualityControls { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 70; minFlatness 0.5; minVol 1e-13; minTetQuality 1e-9; minArea -1; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.02; minVolRatio 0.01; minTriangleTwist -1; // Advanced nSmoothScale 4; errorReduction 0.75; } // Advanced debug 0; // Merge tolerance. Is fraction of overall bounding box of initial mesh. // Note: the write tolerance needs to be higher than this. mergeTolerance 1E-6; // ************************************************************************* // Code:
application simpleFoam; startFrom startTime; startTime 1000; stopAt endTime; endTime 2000; deltaT 1; writeControl timeStep; writeInterval 100; purgeWrite 0; writeFormat binary; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; functions { massFlow { type faceSource; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; outputControl timeStep; outputInterval 1; // Output to log&file (true) or to file only log true; // Output field values as well valueOutput false; // Type of source: patch/faceZone/sampledSurface source faceZone; // if patch or faceZone: name of patch or faceZone sourceName entradaV; // Operation: areaAverage/sum/weightedAverage ... operation sum; surfaceFormat stl; fields ( phi ); } surfaceRegion1 { type surfaceRegion; libs ("libfieldFunctionObjects.so"); log yes; writeArea yes; writeFields true; surfaceFormat none; regionType faceZone; name saidaV; operation average; fields ( p phi U ); } surfaceRegion2 { type surfaceRegion; libs ("libfieldFunctionObjects.so"); log yes; writeArea yes; writeFields true; surfaceFormat none; regionType faceZone; name entradaV; operation sum; fields ( p phi U ); } } // ************************************************************************* // http://imgur.com/byToNs0 it's an external simulation through a circular pipe, and the blue lines in this view are my surfaces that I want to made the measures. When I ran the simulation it goes ok, by I don't get any values that I want in the postProcessor folder, Can anyone help me? Thanks for the attention and sorry if it's a silly doubt. |
|
September 13, 2016, 12:27 |
|
#2 |
Member
Hasan Celik
Join Date: Sep 2016
Posts: 64
Rep Power: 10 |
Hello, maybe it is silly question but your start time says 1000. Do you have the results for 1000th step? Maybe it can be a problem if you try to start from the zeroth step. For taking an average, I use ParaView. By using slice and clip functions of it, it is very easy to draw the point of interest. After doing this, if you use integrateVariables filter, then you can obtain the average quantities by dividing integral value to the area.
|
|
September 14, 2016, 15:07 |
|
#3 | |
New Member
Lucas
Join Date: Aug 2016
Location: Netherland
Posts: 8
Rep Power: 10 |
Quote:
best regards |
||
|
|
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 |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 06:21 |
Pressure Outlet Targeted Mass Flow Rate | LuckyTran | FLUENT | 1 | November 23, 2016 11:40 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 06:13 |