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

Run time post process with swak4foam.: Access velocity at a point

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 14, 2018, 10:23
Default Run time post process with swak4foam.: Create 2D field using swak4foam
  #1
Senior Member
 
Manu Chakkingal
Join Date: Feb 2016
Location: Delft, Netherlands
Posts: 129
Rep Power: 10
manuc is on a distinguished road
Hello All

I am interested to monitor the value of my field at center of my geometry and create a field at each time step, which is equal to the product of the field at that location with the value of the field at the center of the domain. I would like to know if there is any intrinsic function like pos() which could help me to have:
Code:
 C(x,y,z,t) =T(x,y,z,t)* T(x0,y0,z0,t)
How can I access a specific point (x0,y0,z0) and use it in expressionfield.
This issue was solved with the help of the thread below
groovyBC and probe measurement


Now my aim to calculate the product of the velocity (y component) at the sensor1 (see below) with the Y-velocity in a particular plane

What I tried
Create a cloud point.
Code:
functions
   	{    

		createMeasurement 
		{ 
			type createSampledSet; 
			outputControl outputTime; 
			outputInterval 1; 
			setName sensor1; 
			set  { 
					type cloud; 
					axis xyz; 
					points ( 
					(0.01 0.05 0.05) 
					); 
          		 }      
		 }
......
Try1: Create a 3Dfield with the calculation that I need. i.e. multiplying the value from cloudpoint with U.y in the whole domain
Code:
UpCorr
            {
             functionObjectLibs ("libswakFunctionObjects.so");
			 type              expressionField;
 			 outputControl     timeStep;
                 outputInterval    1;
                 variables         ("UpL{set'sensor1}=(U-            							UMean);");   
                 expression        "U.y*UpL.y";
                 fieldName         UpCorr;
                 verbose           true;
                 autowrite         true;

            }
The issue is I only need to do the above calculation at a single plane. But now I am forced to save/calculate for a 3D field.
What I tried and failed
Create a plane as in swakexpression tutorials calculation but try with type expressionfield .
Code:
functions
{
....
UpCorr2
		 {
    		 functionObjectLibs ("libswakFunctionObjects.so");
                 type        expressionField;
    			 valueType   surface;
    			 surfaceName aperturePlane;
   			 surface
    				 {
     				     type             plane;
       			     basePoint        (0.01 0.05 0.05);
        			     normalVector     (0 1 0);
                          interpolate       true;
                      }   
                 variables         ("UpL{set'sensor1}=(U-            							UMean);");   
                 expression         "U.y*UpL.y";
                fieldName           UpCorr2;
                outputControlMode   timeStep;
                outputInterval      1;
                verbose             true;
                autowrite         true;

            }
....
}
But this creates a 3D scalarfield. What I expect is just a 2D field (just for the plane). Can someone help me to do it just for the plane

Thanks in advance
__________________
Regards
Manu

Last edited by manuc; December 15, 2018 at 08:36.
manuc is offline   Reply With Quote

Reply


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
courant number increases to rather large values 6863523 OpenFOAM Running, Solving & CFD 22 July 5, 2023 23:48
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 13:40
AMI interDyMFoam for mixer nu problem danny123 OpenFOAM Programming & Development 8 September 6, 2013 02:34
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
CFX Post: Problems with moving point cloud for changing time steps spatialtime CFX 0 December 7, 2009 04:56


All times are GMT -4. The time now is 01:15.