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

libsampling for DyM solver exporting vtk patch. Problem to update geometry

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2015, 05:11
Default libsampling for DyM solver exporting vtk patch. Problem to update geometry
  #1
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 155
Rep Power: 17
be_inspired is on a distinguished road
Hi all,

I am simulating a case with pimpleDyMFoam and I want to export vtk files while simulation is running.
The following code is included inside the controlDict file. Vtk files are written but only fields information is updated. Geometrical information is not updated so the blade1 is frozen in space when opening the files in paraview. I want to make an animation so I need real position of the patch for that.
Code:
    surfaces
    {
        type        surfaces;

        // Where to load it from (if not already in solver)
        functionObjectLibs ("libsampling.so");

        // outputControl   outputTime;
         outputControl   timeStep;
         outputInterval 1;
         surfaceFormat   vtk;
         fields          ( p U);
         interpolationScheme cell; //cell cellPoint cellPointFace
         surfaces
          (
          blade1
          {
            type            patch;
            patchName        blade1 ;
            interpolate     false;
            needsUpdate     false;
          }
needsUpdate is not a entry for the dictionary but when I include a line like that, geometry is updated in next iteration. Then for the following timesteps, the geometrical information is frozen. If I change that dummy line every time step, then the geometry is updated also every time step

Code:
        //- Does the surface need an update?
        virtual bool needsUpdate() const;

        //- Mark the surface as needing an update.
        //  May also free up unneeded data.
        //  Return false if surface was already marked as expired.
        virtual bool expire();

        //- Update the surface as required.
        //  Do nothing (and return false) if no update was needed
        virtual bool update();
I am using OF-ext3.1 but that piece of code is equal for 2.3.x and 2.4.x.

Thank you very much.

Last edited by be_inspired; July 7, 2015 at 07:46.
be_inspired is offline   Reply With Quote

Old   October 9, 2015, 05:22
Default libsampling with moving walls using pimpleDyMFoam. Position is not updated
  #2
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 155
Rep Power: 17
be_inspired is on a distinguished road
I am running the axial turbine tutorial using the following lines in the control Dict to write the vtk files while runing and so, make a video of the turbine rotating.
The problem is that the geometry is fixed although the variables are updated.
How can the geometrical information be updated also?

Thank you very much


Code:
functions
(
    surfaces
    {
        type        surfaces;

        // Where to load it from (if not already in solver)
        functionObjectLibs ("libsampling.so");

        // outputControl   outputTime;
         outputControl   timeStep;
         outputInterval 1;
         surfaceFormat   vtk;
         fields          ( p U);
         interpolationScheme cell; //cell cellPoint cellPointFace
         surfaces
          (
          RUBLADE
          {
            type            patch;
            patchName        RUBLADE;
         //   interpolate     false;
         //   needsUpdate true;
          }
          RUHUB
          {
            type            patch;
            patchName        RUHUB;
          //  interpolate     false;
          //  needsUpdate     true;
          }
          );
    }
);
be_inspired is offline   Reply With Quote

Old   October 9, 2015, 06:32
Default
  #3
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 155
Rep Power: 17
be_inspired is on a distinguished road
I have repeated the post. Excuse me. I did not remember it.
Any idea how can it be done?
be_inspired is offline   Reply With Quote

Old   October 9, 2015, 08:58
Default Solved
  #4
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 155
Rep Power: 17
be_inspired is on a distinguished road
For any person interested in this topic.
It is needed to change:
File SampledPatch.C
Line 145
false => true
File SampledPlane.C
Line 165
false => true

Then using vtkAnim.py, available in the wikki, and paraview you can obtain quite beautiful movies.
I have only revised patches and planes because it is my need currently.
In this way, always always the patch is kept as updateable

Best Regards
be_inspired 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
[Commercial meshers] Using starToFoam clo OpenFOAM Meshing & Mesh Conversion 33 September 26, 2012 05:04
Problem with implicit unsteady solver CCMuser STAR-CCM+ 2 March 3, 2010 12:20
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51
Multicomponent fluid Andrea CFX 2 October 11, 2004 06:12
compressible two phase flow in CFX4.4 youngan CFX 0 July 2, 2003 00:32


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