CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Paraview & paraFoam

SurfaceFields on paraFoam

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

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   January 29, 2012, 14:53
Default SurfaceFields on paraFoam
  #1
New Member
 
Javier Garcia
Join Date: Sep 2009
Posts: 7
Rep Power: 6
fjgg1549 is on a distinguished road
Dear Foamers,

I need to plot surfaceScalarFields (like phi) in paraFoam.

I have modified interFoam solver to create some surfaceScalarFields (openFoam 2.1.0). When I run the solver the corresponding field-files are created nicely in their respective time-folders.

I have already run foamToVTK -surfaceFields and I have got the VTK subdirectory. I have also used a Glyph filter.

My problem is that I cannot see any surfaceScalarField in the "Color by" pop-up menu. so I am unable to plot them.

Could anyone help me please?

Thanks.

Javier Garcia
fjgg1549 is offline   Reply With Quote

Old   February 4, 2012, 17:05
Default surfaceFields
  #2
New Member
 
Javier Garcia
Join Date: Sep 2009
Posts: 7
Rep Power: 6
fjgg1549 is on a distinguished road
Could anyone help me please?

Javier Garcia
fjgg1549 is offline   Reply With Quote

Old   February 10, 2012, 15:18
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 6,987
Blog Entries: 32
Rep Power: 69
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Greetings Javier and welcome to the forum!

If you attach one of those VTK files, or a small example case, it would be a lot easier to help you!
Otherwise, all we can do is guess: the surface scalar field probably only has vectors, but no scalars. Most you can get is coloring based on length/magnitude of the vectors.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   February 10, 2012, 19:19
Default
  #4
New Member
 
Javier Garcia
Join Date: Sep 2009
Posts: 7
Rep Power: 6
fjgg1549 is on a distinguished road
Thanks wyldckat for your reply. I am using OpenFoam 2.1.0. I need to calculate the whole volume exiting a pipe, and take it into account in order to modify the pressure within a vessel. So I took interFoam as a starting point, and I have created a surfaceScalarField in createFileds.H called localVolume:

surfaceScalarField localVolume
(
IOobject
(
"localVolume",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
phi*scalar(0)*runTime.deltaT()
);

Field localVolume is defined as (time integral of phi):

localVolume = phi * runTime.deltaT() + localVolume;

Later, I have created a groovyBC in patch inlet for p_rgh, using a variable called exitVolume in patch atmosphere:

inlet
{
type groovyBC;
value uniform 1;
valueExpression "1/pow(1+0.001*exitVolume,1.4)";
gradientExpression "0";
fractionExpression "1";
variables "exitVolume{atmosphere}=sum(localVolume);";
}

My case runs beautifully. My only problem is that I cannot see field localVolume (neither phi) in paraFoam, because it is a surfaceScalarField and it does not appear in any of the pull-down menus of fields offered in paraFoam.
How should I proceed in order to visualize my field localVolume (or phi for that matter)? Could you, please, offer a step-by-step procedure to do so?

I shall be very grateful if you could do it.

Thanks and best regards.

Javier Garcia
fjgg1549 is offline   Reply With Quote

Old   February 11, 2012, 11:10
Default
  #5
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 6,987
Blog Entries: 32
Rep Power: 69
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Hi Javier,

OK, now I understand. These fields are only points, although we can't display them directly. The solution is somewhat simple:
  1. Run foamToVTK:
    Code:
    foamToVTK -surfaceFields
  2. Run paraFoam.
  3. Load the surface fields base file "VTK/surfaceFields/surfaceFields_..vtk", so you can see them with the respective time snapshot.
  4. Then apply the "Glyphs" filter to this file and you should see the respective points in glyph form.
Best regards,
Bruno
yanxiang likes this.
wyldckat is offline   Reply With Quote

Old   February 11, 2012, 16:23
Default
  #6
New Member
 
Javier Garcia
Join Date: Sep 2009
Posts: 7
Rep Power: 6
fjgg1549 is on a distinguished road
Thank you very much Bruno. Now I can see some nice arrows of surfaceScalarField localVolume.

You have been most helpfull.

Thanks and best regards.

Javier Garcia
fjgg1549 is offline   Reply With Quote

Reply

Tags
parafoam, paraview, surfacefields, surfacescalarfields

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird Problem with ParaFoam via SSH cwang5 OpenFOAM Paraview & paraFoam 2 July 19, 2010 09:00
pointVectorField in ParaFoam s_braendli OpenFOAM Paraview & paraFoam 0 April 22, 2010 08:36
paraFoam, problem loading 'volume fields' bigphil OpenFOAM Paraview & paraFoam 0 April 29, 2009 09:36
Parafoam basic questions qtian OpenFOAM Paraview & paraFoam 0 July 20, 2007 11:52
ParaFoam OF 14 decomposed cases philippose OpenFOAM Paraview & paraFoam 4 April 18, 2007 05:17


All times are GMT -4. The time now is 09:46.