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

How to write the sampled field values of a curved internal surface?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 15, 2021, 12:51
Default How to write the sampled field values of a curved internal surface?
  #1
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 4
cfdcheckers is on a distinguished road
I am trying to sample the field values on an internal curved surface. The way I managed to sample the values was using the function object surfaceInterpolate in controlDict. For this I created a dummy surface where I needed the sampling and defined it as "empty" physical surface, and correspondingly making it empty in each 0 folder files.



Code:
functions
{
    dummySurfaceData
    {
        type            surfaceInterpolate; //surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
        writeControl    writeTime;
        writeFields     true;
        surfaceFormat   raw;
        regionType      faceZone; //faceZone;
        name            dummySurface;
        operation       none;
        fields
        (
            (p pNear) (T TNear) (U UNear)
        );
   }
}
If I open the results in paraview I can see the data on the faceZone but I did not find any file written for the dummySurface field values in the case folder. All I see is the pNear, TNear and UNear files in the time folders but the entries for the dummySurface are none in those.


So am wondering if there's any way I can write these sampled field values to a (csv) file?
cfdcheckers is offline   Reply With Quote

Old   July 15, 2021, 13:31
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
You may define lines where you get the results. Here an example:

Code:
setFormat raw;
surfaceFormat raw;
type    sets;
libs    ("libsampling.so");
interpolationScheme cellPoint;
fields (   U  ); // Fields to sample.


sets ( 
    w0 {  type lineUniform; axis distance; nPoints 500;
       start (  -0.03 0  0 );
       end (  -0.06 0  0 );
    }
    w5 {  type lineUniform; axis distance; nPoints 300;
start (  -0.0295442 0.00520945  0 );
end (  -0.0413619 0.00729324  0 );
    }

    w10 {  type lineUniform; axis distance; nPoints 300;
start (  -0.0281908 0.0102606  0 );
end (  -0.0394671 0.0143648  0 );
    }
}

  );
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   July 15, 2021, 15:21
Default
  #3
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 4
cfdcheckers is on a distinguished road
Quote:
Originally Posted by piu58 View Post
You may define lines where you get the results. Here an example:

Thanks Uwe for a quick example. I just tried this, in my case it will probably be arcUniform type. However, this method requires me to use start and end angle values. This will not be very convenient when I have changes in the dimensions. I intend to do multiple simulations by changing cylinder diameters. That's why a defined patch name would be very convenient, I thought.

Additionally, I do not want to specify number of cells manually.



Any way out in that case?
cfdcheckers is offline   Reply With Quote

Old   July 17, 2021, 10:28
Default
  #4
New Member
 
Lewis
Join Date: Jun 2021
Posts: 26
Rep Power: 4
cfdcheckers is on a distinguished road
Ok, I tried to parameterise it so that it makes a little more convenient.

But it seems mag(U) is not recognised now. Strange. On the forum it doesn't seem like it's been noticed in recent times.


Update: I realised why. It couldn't recognise the field because it doesn't exist! Found an easy way to tackle this by including #includeFunc mag(U) in controlDict

Last edited by cfdcheckers; July 18, 2021 at 20:28. Reason: Update
cfdcheckers is offline   Reply With Quote

Reply

Tags
curved surface, cylinder, functionobject, sampling, sampling data

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
mesh file for flow over a circular cylinder Ardalan Main CFD Forum 7 December 15, 2020 13:06
SU2 7.0.7 Built on CentOS 7, parallel computation pyscript mpi exit error? EternalSeekerX SU2 3 October 9, 2020 18:28
[swak4Foam] swakExpression not writing to log alexfells OpenFOAM Community Contributions 3 March 16, 2020 18:19
[Other] dynamicTopoFVMesh and pointDisplacement RandomUser OpenFOAM Meshing & Mesh Conversion 6 April 26, 2018 07:30
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 14:37


All times are GMT -4. The time now is 23:05.