|
[Sponsors] |
October 16, 2015, 05:03 |
Another option to "SWAK4FOAM"
|
#1 |
New Member
Stefan
Join Date: Oct 2015
Location: Bavaria, Germany
Posts: 6
Rep Power: 11 |
Hello dear Foamers,
i´d like to simulate an air vane motor to improve it. The criteria of convergence should be the pressure drop between a plane at the inlet and a plane at the outlet of the vane motor. Google search offered me the "swak4foam" as possibility to solve my problem. Unfortunately the software admistrator of my university does not want to install additional software. So my final question: Is there another way to transpose "my idea"? Thank you very much PS: I hope my english is as well as you understand my needs ;-) |
|
October 16, 2015, 05:19 |
|
#2 |
Senior Member
|
Hi,
There are several possibilities: 1. Compile swak4Foam in your home folder. I.e. it will be just local installation and you do not need administrator for this. 2. Use codedFunctionObject for check for convergence criterion and finish simulation. See description in $FOAM_SRC/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.H. Surely there are more (like, modify solver to check for your specific convergence criterion). After you resolve problems with compilation of swak4Foam (it will be another story) or figure out exact syntax for coded function object, you need to define "pressure drop between a plane at the inlet and a plane at the outlet" more strictly. Last edited by alexeym; October 16, 2015 at 05:20. Reason: second thought |
|
October 16, 2015, 05:36 |
|
#3 | |
New Member
Stefan
Join Date: Oct 2015
Location: Bavaria, Germany
Posts: 6
Rep Power: 11 |
Quote:
I´d like to define a plane/plain (french: région) before and after the vane motor. OpenFOAM should calculate the total pressure in this plane/plain by integration. I get the pressure drop by substracting the pressore of the outlet from the pressure at the inlet. |
||
October 16, 2015, 06:13 |
|
#4 |
Senior Member
|
Hi,
C'est un plan (en, fr, de) si nous parlons de mathématiques In fact new definition is not exactly more precise than the previous one. Since in your simulation you do not have planes before and after motor, but you have mesh, you need to talk in terms of mesh. 1. Does your mesh move? I.e. you just need to define mapping between mesh cells and planes just once of update it every step. 2. What are integration variables in your integral? In the plane you have pressure values and areas of the plane elements. I can imagine calculation of mean pressure (), yet what is "total pressure"? By "more strictly" in my previous message I did not mean wording but mathematical strictness. Since your convergence criterion implementation will base on math, not vice versa. |
|
October 16, 2015, 06:59 |
|
#5 |
New Member
Stefan
Join Date: Oct 2015
Location: Bavaria, Germany
Posts: 6
Rep Power: 11 |
One more try to explain the plane. (little poem)
In this picture you see the inlet and outlet of the vane motor. Is there a possibility to determine the pressure at the inlet and at the outlet? So that i can change the geometry in CAD and make the vane motor more efficient? 1. The mesh is not moving YET. This will be the next step after finding a solution for my first problem. 2. The integration was only an example. Stefan |
|
October 16, 2015, 09:05 |
|
#6 |
Senior Member
|
Yes, it is possible to determine pressure at the inlet and at the outlet. Though it is you, who decides how to do it (i.e. for example in functionObject you have access to mesh and boundaries, so you have access to pressure values in the cells/faces, for the case of uniform pressure distribution everything is obvious, in case of non-uniform spatial distribution, you have to decide, what to do with this non-uniform distribution).
|
|
October 18, 2015, 15:12 |
|
#7 |
New Member
Stefan
Join Date: Oct 2015
Location: Bavaria, Germany
Posts: 6
Rep Power: 11 |
Many thanks for your reply, alexeym
So i could define the needed cells/faces to determine the pressure in it (with functionObjects)? Unfortunately i don´t know, if there´s a uniform or non-uniform pressure distribution. Another question: how to use the functionOptions? |
|
October 19, 2015, 03:31 |
|
#8 | ||
Senior Member
|
Hi,
Quote:
Quote:
Or use search engine of your preference. |
|||
October 25, 2015, 09:08 |
|
#9 |
New Member
Stefan
Join Date: Oct 2015
Location: Bavaria, Germany
Posts: 6
Rep Power: 11 |
Hallo,
i have another problem using the functionObjects. I would like to use faceSource to determine the pressure at the inlet. But the simultion stops because of an Fatal Error: [5] #1 Foam::IOerror::abort()[0] [0] [0] --> FOAM FATAL IO ERROR: [0] Invalid plane type: patch [0] [0] file: /home/ESPL_001/ft2624/Documents/rechenfallniko/processor0/../system/controlDict::functions:lan0_average::sampledSurf aceDict from line 32 to line 41. [0] [0] From function plane:lane(const dictionary&) [0] in file meshes/primitiveShapes/plane/plane.C at line 233. But patch should be a valid plane type type faceSource; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; outputControl timeStep; //outputTime timeStep outputInterval 1; // Output to log&file (true) or to file only log true; // Output field values as well valueOutput false; //true; // Type of source: patch/faceZone/sampledSurface source patch; // sampledSurface SourceName inlet; Which plane type is defined to the inlet? The plane type of the inlet is defined to "patch" in the blockMeshDict, right? frontAndBack { type patch; faces ( (4 5 6 7) (0 3 2 1) (7 6 10 11) (8 9 2 3) ); } inlet { type patch; faces ( (0 4 7 3) ); } outlet { type patch; faces ( (3 7 11 8) ); } Stefan |
|
October 25, 2015, 13:15 |
|
#10 |
Senior Member
|
Hi,
Could you post whole controlDict? In the message it is said that the error is in Code:
system/controlDict::functions::plan0_average::sampledSurfaceDict |
|
October 25, 2015, 14:26 |
|
#11 |
New Member
Stefan
Join Date: Oct 2015
Location: Bavaria, Germany
Posts: 6
Rep Power: 11 |
Yes, of course.
Here the hole controlDict. /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application simpleFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 1000; deltaT 1; writeControl timeStep; writeInterval 200; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression compressed; timeFormat general; timePrecision 6; runTimeModifiable true; functions { // #include "readFields" // #include "streamLines" // #include "cuttingPlane" #include "forceCoeffs" #include "inlet_average" } // ************************************************** *********************** // Please notice: The function plan0_average is now called inlet_average Here the hole script of inlet_average: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ inlet_average { type faceSource; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; outputControl timeStep; //outputTime timeStep outputInterval 1; // Output to log&file (true) or to file only log true; // Output field values as well valueOutput false; //true; // Type of source: patch/faceZone/sampledSurface source sampledSurface; // sampledSurface SourceName inlet; source sampledSurface; sampledSurfaceDict { type cuttingPlane; planeType pointAndNormal; //pointAndNormal planeName inlet; //planeName pointAndNormalDict { basePoint (0.02 0 0); normalVector (1 0 0); } source cells; // sample cells or boundaryFaces interpolate true; } // Operation: areaAverage/sum/weightedAverage ... operation areaAverage; fields ( U p ); } // ************************************************** *********************** // |
|
October 26, 2015, 06:57 |
|
#12 |
Senior Member
|
Guess there is no error with this dictionary? If you like to have sampledSurface as a patch, it is called sampledPatch. According to constructor you should provide list of patches and triangulate option. So dictionary should look like:
Code:
sampledSurfaceDict { type sampledPatch; patches ( inlet ); triangulate no; // this is default in fact do you can drop it } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting the height of the stream in the free channel | kevinmccartin | CFX | 12 | October 13, 2022 22:43 |
Radiation in semi-transparent media with surface-to-surface model? | mpeppels | CFX | 11 | August 22, 2019 08:30 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |