|
[Sponsors] |
[swak4Foam] run-time function/expression evaluation at a part of a cross section |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 1, 2015, 11:17 |
run-time function/expression evaluation at a part of a cross section
|
#1 |
New Member
Silvan
Join Date: Jun 2014
Posts: 12
Rep Power: 12 |
Dear foamers,
I am trying to calculate the mass flow (and other quantities) during run-time with functions/expressions from swak4foam. So far, I successfully managed to compute these values at a randomly defined plane which slices the complete domain. Now, I would like to calculate these values at a part/subset of this cross section, e.g. a circle which lies in this plane. Here is a short description on how I am trying to achieve this: 1) Use topoSet to define a sphere with the desired radius. Create a zone of the cells within this sphere. 2) Use functions in the controlDict to define the plane of interest and calculate whatever needed. Using zone, I expect to "intersect" the sphere with the plane and thus create the desired circle. The only thing that I was able to achieve was that the plane I am looking at has been reduced to about half its original size (looks kind of random in ParaView). Thus, also the calculated mass flow has reduced accordingly. BUT, the mass flow is still computed on the whole of the remaining plane. So, no sign of successful "intersection"... I already searched the internet and found the following resources: http://openfoamwiki.net/index.php/TopoSet https://github.com/OpenFOAM/OpenFOAM...et/topoSetDict http://www.cfd-online.com/Forums/ope...ing-plane.html http://openfoamwiki.net/images/2/2a/...esentation.pdf But, none of these could answer my question completely... And here follows a code snippet of the topoSetDict: Code:
actions ( { name apertureSphereZone; type cellSet; action new; source sphereToCell; sourceInfo { centre (-1 0 0); radius 0.18; } } { name apertureSphereZone; type cellZoneSet; action new; source setToCellZone; sourceInfo { set apertureSphereZone; } } ); Code:
libs ( "libgroovyBC.so" "libsimpleFunctionObjects.so" "libsimpleSwakFunctionObjects.so" "libswakFunctionObjects.so" "libgroovyStandardBCs.so" ); functions ( flowAperture { type swakExpression; valueType surface; surfaceName aperturePlane; surface { type plane; basePoint (-1 0 0); normalVector (1 0 0); interpolate true; zone apertureSphereZone; } expression "U.x*rho"; writeSurfaceOnConstruction true; surfaceFormat vtk; accumulations ( min max weightedAverage integrate ); outputControlMode timeStep; outputInterval 1; verbose true; } ); A) Am I on the right track? B) Are there alternatives? Could one use e.g. Code:
condition "(pow(pos().y,2)+pow(pos().z,2)) < pow(0.18,2)"; Every hint will be appreciated! Thanks in advance for your support! Happy foaming to you all, Silvan |
|
July 3, 2015, 04:53 |
I am still looking for your opinion :-)
|
#2 |
New Member
Silvan
Join Date: Jun 2014
Posts: 12
Rep Power: 12 |
I am still stuck with this question and would highly appreciate your opinion on this matter.
Especially comments from gschaider are welcomed. By the way, thank you very much for developing these useful tools! :-) Looking forward to your inspirations! Silvan |
|
July 13, 2015, 03:31 |
No solution so far...
|
#3 |
New Member
Silvan
Join Date: Jun 2014
Posts: 12
Rep Power: 12 |
Dear Foamers,
I didn't come any further... Is it true that no one has a suggestion on how to solve this??? In such a big group of experts? Looking forward to your reply, Silvan |
|
August 3, 2015, 11:12 |
|
#4 |
New Member
Join Date: Aug 2012
Posts: 13
Rep Power: 14 |
I have the same problem!
@gschaider any suggestions? RMF |
|
Tags |
expression, function, run-time processing, swak4foam, toposet |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 05:13 |
[Commercial meshers] converting Fluent mesh to openfoam standard mesh | deepesh | OpenFOAM Meshing & Mesh Conversion | 31 | March 29, 2017 06:59 |
Transient run continues from last time (when startover is desired) | bongbang | CFX | 2 | March 23, 2015 00:05 |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 16:33 |
same geometry,structured and unstructured mesh,different behaviour. | sharonyue | OpenFOAM Running, Solving & CFD | 13 | January 2, 2013 23:40 |