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

Produce a cut plane through axisymmetric domain in OF-2.1.x from sampleDict

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mcarpe

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 4, 2012, 04:21
Default Produce a cut plane through axisymmetric domain in OF-2.1.x from sampleDict
  #1
Senior Member
 
aerospain
Join Date: Sep 2009
Location: Madrid, Spain
Posts: 149
Rep Power: 16
aerospain is on a distinguished road
Send a message via Skype™ to aerospain
Hi everyone!

I have been trying to get a slice through an OF-2.1.x axisymmetric region in order to be used as base to post-process streamlines afterwards with another software.

I've spent two days trying to understand why the following lines were giving me an EOF error message:

surfaces
(
constantPlane
{
type plane;
basePoint (0 0 0.005);
normalVector (0 1 0);
}
);

Now, I don't get that error message by using:
surfaces
(
triangleCut
{
// Cutingplane using iso surface
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
basePoint (0 0 0.005);
normalVector (0 1 0);
}
interpolate true;
}
);

But, I don't get any field data on that plane!!! :-( I get results for several line sets I have also defined in sampleDict, but nothing for that plane. I know I can go into paraView, but I'm trying to reduce the number of steps in my post-processing.

Could anyone bring some light on this doubt I now have, please?

Thanks!
aerospain is offline   Reply With Quote

Old   October 4, 2012, 04:34
Default
  #2
Senior Member
 
aerospain
Join Date: Sep 2009
Location: Madrid, Spain
Posts: 149
Rep Power: 16
aerospain is on a distinguished road
Send a message via Skype™ to aerospain
Please, forget about me saying I wasn't getting any results. I was looking inside the sub-directory 'sets'. Without realizing there was another one, called 'surfaces', next to it.

Embarrassing!!! :-(

Still, why was I getting the EOF error message? mmmm ...

thanks!
aerospain is offline   Reply With Quote

Old   October 5, 2012, 07:38
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi aerospain,

If I remember correctly, EOF can happen due to at least two situations:
  • Missing semi-colon ";" or parenthesis/brackets ")" "}".
  • Missing keywords or attributes.
In other words, the dictionary reader keeps parsing characters until it finds what's it's looking for... or until it reaches the End-Of-File


Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 8, 2012, 06:59
Default
  #4
Senior Member
 
aerospain
Join Date: Sep 2009
Location: Madrid, Spain
Posts: 149
Rep Power: 16
aerospain is on a distinguished road
Send a message via Skype™ to aerospain
Thanks wyldckat,

It must be a missing keyword/attribute. I used the original example file that comes with the OF installation, so there must be something I'm missing.

regards!
aerospain is offline   Reply With Quote

Old   October 8, 2012, 09:30
Default
  #5
New Member
 
Matteo Carpentieri
Join Date: Mar 2009
Posts: 28
Rep Power: 17
mcarpe is on a distinguished road
Hi Aerospain,

I don't know if it's related to your problem, but I too had issues with surface sampling.

See here: http://www.cfd-online.com/Forums/ope...-sampling.html

I wasn't obtaining any output files. I wasn't able to figure out what's wrong, but using object functions during the simulation instead of sample (post-processing) works OK.

It might be a bug, but I'm not sure. I couldn't even make the tutorials work, so it's either my OpenFOAM installation or a bug.
mcarpe is offline   Reply With Quote

Old   October 8, 2012, 10:56
Default
  #6
Senior Member
 
aerospain
Join Date: Sep 2009
Location: Madrid, Spain
Posts: 149
Rep Power: 16
aerospain is on a distinguished road
Send a message via Skype™ to aerospain
Thanks Matteo!

I will look into it. I must find some more description about it my run-time sampling plane/surface should be a cut xz-plane through y=0.

cheers!
aerospain is offline   Reply With Quote

Old   October 9, 2012, 07:16
Default
  #7
Senior Member
 
aerospain
Join Date: Sep 2009
Location: Madrid, Spain
Posts: 149
Rep Power: 16
aerospain is on a distinguished road
Send a message via Skype™ to aerospain
Hi Matteo,

I've been reading about the 'sampledPatch' you mention in the thread you mentioned yesterday, but I cannot understand how to use it. I've been looking in the OF installation directory in my computer with no luck. And, forums are not being quite informative.

Would you be kind enough to share some notes/thoughts with me?

BTW, my interest is in generating a vertical cut plane.

Regards
aerospain is offline   Reply With Quote

Old   October 9, 2012, 11:19
Default
  #8
New Member
 
Matteo Carpentieri
Join Date: Mar 2009
Posts: 28
Rep Power: 17
mcarpe is on a distinguished road
Hi aerospain,

function objects can be executed during the simulations by putting the relevant code in the controlDict file.

In your case I believe the correct one to use would be cuttingPlane. Your sampleDict entry can be translated as a run-time function object in controlDict as:

Code:
cuttingPlane
{
    type            surfaces;
    functionObjectLibs ("libsampling.so");
    outputControl   outputTime;

    surfaceFormat   raw; // you can change this to "vtk"
    fields          ( p U ); // chose the fields you need

    interpolationScheme cellPoint;

    surfaces
    (
        constantPlane
        {
            type            cuttingPlane;
            planeType       pointAndNormal;
            pointAndNormalDict
            {
                basePoint       (0 0 0.005);
                normalVector    (0 1 0);
            }
            interpolate     true;
        }
    );
}
In theory this should give you the same results as sampling in post-processing. In practice, at least for me, surface sampling does not work, while this does.

For further info on function objects have a look here: http://www.openfoam.com/features/run...processing.php

and also the motorBike tutorial in incompressible/simpleFoam.

Cheers
Matteo
ufocfd likes this.
mcarpe is offline   Reply With Quote

Old   October 9, 2012, 11:27
Default
  #9
Senior Member
 
aerospain
Join Date: Sep 2009
Location: Madrid, Spain
Posts: 149
Rep Power: 16
aerospain is on a distinguished road
Send a message via Skype™ to aerospain
Thanks Matteo,

I'll try it right away!

About the link you've given me. It takes me to a page, where I've been several times, where I can see a list of "available functionality" but without examples or further links :-/ sometimes, OF guidelines drive me crazy ;-(

cheers!
aerospain is offline   Reply With Quote

Old   October 10, 2012, 06:05
Default
  #10
Senior Member
 
aerospain
Join Date: Sep 2009
Location: Madrid, Spain
Posts: 149
Rep Power: 16
aerospain is on a distinguished road
Send a message via Skype™ to aerospain
Hello Matteo,

I've tried your suggestion and got cut planes at each 'writeout' instance during the simulation, this will be quite useful when I start investigating unsteady phenomena in my research.

Just one comment/question, I don't get a 'clean cut' meaning that for each x-coordinate (this is a structured mesh) I don't get the same number of z-points and their values get a bit noisy in some parts of the mesh. I'm attaching a scatter plot from matlab where you can observe what I'm trying to explain.

cheers!
Attached Images
File Type: jpg Screenshot from 2012-10-10 12:03:58.jpg (88.7 KB, 55 views)
aerospain is offline   Reply With Quote

Old   October 11, 2012, 05:06
Default
  #11
New Member
 
Matteo Carpentieri
Join Date: Mar 2009
Posts: 28
Rep Power: 17
mcarpe is on a distinguished road
Quote:
Originally Posted by aerospain View Post
Hello Matteo,

I've tried your suggestion and got cut planes at each 'writeout' instance during the simulation, this will be quite useful when I start investigating unsteady phenomena in my research.

Just one comment/question, I don't get a 'clean cut' meaning that for each x-coordinate (this is a structured mesh) I don't get the same number of z-points and their values get a bit noisy in some parts of the mesh. I'm attaching a scatter plot from matlab where you can observe what I'm trying to explain.

cheers!
mmmm.... sorry, I don't know. I've only used this with sampledPatch and I haven't got any problem with it. I hope someone with more experience gets notice of this thread...
mcarpe 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
View with cut plane Mudblood FLUENT 5 April 4, 2020 10:17
[ICEM] cut plane visualization Will Anderson ANSYS Meshing & Geometry 12 August 26, 2015 14:20
How to use values of a plane cutting the domain for inlet conditions? StefanG CFX 9 July 3, 2012 08:05
[OpenFOAM] View the pressure drop contour in a cut plane 2D in a right position zhoubinwx ParaView 3 February 13, 2008 04:46
cut plane? qiaomu FLUENT 1 May 12, 2003 17:24


All times are GMT -4. The time now is 22:24.