CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Sampling surface: invariant option revisited

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

LinkBack Thread Tools Search this Thread Display Modes
Old   August 20, 2020, 15:37
Default Sampling surface: invariant option revisited
New Member
Join Date: May 2017
Posts: 16
Rep Power: 5
arashgmn is on a distinguished road
I'm trying to sample on the surface of a rotating body. The mesh doesn't change during the rotation (part of the mesh is rotating with the body).

I configured the samping postProcessing function in controlDict as follows:

Surf //folder name
	type            surfaces;	
    libs            (sampling);
    writeControl    writeTime;

    surfaceFormat   vtk;
    fields          (p U);

		surface_pU //file name
			type 				patch;
			patches				("Airfoil");
			interpolate 		true;
			invariant       	true;  // Unaffected by mesh motion
	 		// Optional: whether to leave as faces (=default) or triangulate
			// triangulate false;
			fixedLocations 		false;
			format				ascii;
	    // Optional (inherited) entries
	region          region0;
    enabled         true;
    log             true;
    timeStart       0;
    timeEnd         $endTime;
    executeControl  writeTime;
    executeInterval 1;
    writeControl    timeStep;
    writeInterval   1;

and successfully ran it via
pimpleFoam -postProcess
. Now I have a bunch of files in the subdirectories of Surf folder as vtk. So far So good.

The problem, if there's any, is that despite the movement of the surface, the surface sample files, "seem" fixed in space. Nevertheless, surface values are reasonable. The picture below shows it more clearly:

My airfoil, starts pitching from a horizontal orientation (at time 0) counter clockwise. In paraview, however, the loaded vtk files are still horizontal, despite the fact that the are for time 0.06 in which the airfoil is inclined.

I switched the
option true and false. Yet didn't see any difference. So what does this option do really?
arashgmn is offline   Reply With Quote

Old   September 11, 2020, 11:07
Senior Member
Mark Olesen
Join Date: Mar 2009
Posts: 1,179
Rep Power: 29
olesen will become famous soon enougholesen will become famous soon enough
Originally Posted by arashgmn View Post

I switched the
option true and false. Yet didn't see any difference. So what does this option do really?

Like the comment states
// Unaffected by mesh motion

This can be useful in some specialized cases. For example, you are sampling a slice in the wake of a vehicle, any you know that the rotating wheels and the fan simply do not affect which cells this slice samples. By specifying invariant, you are saying that you although OpenFOAM may have moved some points around the wheels, you know that this does not affect your sample region so you can save generating irrelevant output geometry for your sampled surface. Currently it is only the ensight writer that can properly benefit from this. VTK output always includes the geometry and doesn't care if it changed or not.

Summary: for your case leave invariant off. Your problem is elsewhere. Having said that, it looks like the sampling mechanism is not being properly expired on the mesh motion. Would suggest providing a small test case on
olesen is offline   Reply With Quote


mesh rotation, sampling

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
Domain Reference Pressure and mass flow inlet boundary AdidaKK CFX 75 August 20, 2018 05:37
Problem with an old Simulation FrankW CFX 3 February 8, 2016 04:28
Waterwheel shaped turbine inside a pipe simulation problem mshahed91 CFX 3 January 10, 2015 11:19
Low Mixing time Problem Mavier CFX 5 April 29, 2013 00:00
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 04:05

All times are GMT -4. The time now is 13:54.