CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] run-time function/expression evaluation at a part of a cross section

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2015, 10:17
Question run-time function/expression evaluation at a part of a cross section
  #1
New Member
 
Silvan
Join Date: Jun 2014
Posts: 12
Rep Power: 8
silvan is on a distinguished road
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;
    }
  }
);
And a snippet from the controlDict with the functions:
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;
}
);
I ask you the following:
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)";
within the swakExpression to achieve the same?

Every hint will be appreciated! Thanks in advance for your support!
Happy foaming to you all,
Silvan
silvan is offline   Reply With Quote

Old   July 3, 2015, 03:53
Post I am still looking for your opinion :-)
  #2
New Member
 
Silvan
Join Date: Jun 2014
Posts: 12
Rep Power: 8
silvan is on a distinguished road
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
silvan is offline   Reply With Quote

Old   July 13, 2015, 02:31
Default No solution so far...
  #3
New Member
 
Silvan
Join Date: Jun 2014
Posts: 12
Rep Power: 8
silvan is on a distinguished road
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
silvan is offline   Reply With Quote

Old   August 3, 2015, 10:12
Default
  #4
RMF
New Member
 
Join Date: Aug 2012
Posts: 13
Rep Power: 10
RMF is on a distinguished road
I have the same problem!
@gschaider any suggestions?

RMF
RMF is offline   Reply With Quote

Reply

Tags
expression, function, run-time processing, swak4foam, toposet

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
[Commercial meshers] converting Fluent mesh to openfoam standard mesh deepesh OpenFOAM Meshing & Mesh Conversion 31 March 29, 2017 05:59
Transient run continues from last time (when startover is desired) bongbang CFX 2 March 22, 2015 23:05
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
same geometry,structured and unstructured mesh,different behaviour. sharonyue OpenFOAM Running, Solving & CFD 13 January 2, 2013 22:40


All times are GMT -4. The time now is 03:49.