CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Meshing & Mesh Conversion

how to setFields in openFOAM when you have imported mesh from salome or other package

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

Like Tree1Likes
  • 1 Post By TobM

Reply
 
LinkBack Thread Tools Display Modes
Old   August 9, 2014, 14:35
Default how to setFields in openFOAM when you have imported mesh from salome or other package
  #1
Member
 
Muhammad Usman
Join Date: Feb 2014
Posts: 67
Rep Power: 3
13msmemusman is on a distinguished road
i am working on a project in which i generated mesh using salome and converted it into openfoam format but after converting it i found that i have to use setFields utility to set two separate fluids in their positions anyone plz help me in doing that.... i would be grateful to you
13msmemusman is offline   Reply With Quote

Old   August 29, 2014, 04:11
Default
  #2
New Member
 
Join Date: Jul 2014
Posts: 22
Rep Power: 3
jokerito is on a distinguished road
Hello,

this shouldn't be difficult. Just take a setField from a tutorial and edit it with your wished positions.

Code:
boxToCell   
    {
    box (0.5 -3.7 -0.75) (22 -2 15);
        fieldValues
        (
            volScalarFieldValue alpha.water 1
        );
    }
Just keep in mind that the coordinates are (xmin ymin zmin) (xmax ymax zmax).

Best regards,
Mike
jokerito is offline   Reply With Quote

Old   April 7, 2015, 01:07
Post setFields for 2 phase_3D_imported_ICEMCFD
  #3
New Member
 
Join Date: Mar 2015
Posts: 15
Rep Power: 2
Sam_CFD is on a distinguished road
Quote:
Originally Posted by jokerito View Post
Hello,

this shouldn't be difficult. Just take a setField from a tutorial and edit it with your wished positions.

Code:
boxToCell   
    {
    box (0.5 -3.7 -0.75) (22 -2 15);
        fieldValues
        (
            volScalarFieldValue alpha.water 1
        );
    }
Just keep in mind that the coordinates are (xmin ymin zmin) (xmax ymax zmax).

Best regards,
Mike
Hi,

I have a case with 2 phases as i attached in a picture. I have meshed it in ICEMCFD and converted the model to OpenFOAM.

Now i have to define field values using setFieldsDict but the problem is how find the box values (like box (0.5 -3.7 -0.75) (22 -2 15) from converted model is the question.

I am new to OpenFOAM. Could you please help me?

Regards,
Sam
Attached Images
File Type: jpg model.jpg (26.0 KB, 15 views)
Sam_CFD is offline   Reply With Quote

Old   April 7, 2015, 02:36
Default
  #4
New Member
 
Join Date: Sep 2014
Posts: 14
Rep Power: 2
TobM is on a distinguished road
Your system of coordinates should be the same as in ICEM, just keep in mind that OpenFOAM works in meters, maybe you have to transfer the units.
The box values are the coordinates of the starting and ending point of the diagonal line of the box.
So, you can either take the points from ICEM or you open your mesh in paraview, for example, and take the coordinates from there.
TobM is offline   Reply With Quote

Old   April 7, 2015, 04:58
Default co-ordinate points in paraview
  #5
New Member
 
Join Date: Mar 2015
Posts: 15
Rep Power: 2
Sam_CFD is on a distinguished road
Quote:
Originally Posted by TobM View Post
Your system of coordinates should be the same as in ICEM, just keep in mind that OpenFOAM works in meters, maybe you have to transfer the units.
The box values are the coordinates of the starting and ending point of the diagonal line of the box.
So, you can either take the points from ICEM or you open your mesh in paraview, for example, and take the coordinates from there.
Hi ,

Could you please suggest me how to know the co-ordinated of the point in paraview ?

regards,
Sangamesh hosur
Sam_CFD is offline   Reply With Quote

Old   April 7, 2015, 05:05
Default
  #6
New Member
 
Join Date: Sep 2014
Posts: 14
Rep Power: 2
TobM is on a distinguished road
You can use the Ruler under Sources to get your coordinates.
Sam_CFD likes this.
TobM is offline   Reply With Quote

Old   April 7, 2015, 08:16
Default Can not see alphs in paraview
  #7
New Member
 
Join Date: Mar 2015
Posts: 15
Rep Power: 2
Sam_CFD is on a distinguished road
Quote:
Originally Posted by TobM View Post
You can use the Ruler under Sources to get your coordinates.
Hi,

Your suggestion worked for me. But once I do setFields and check in paraview then paraview automatically closing and giveing a message killed.

What would be the solution for the problem ?

Regards,
Sam
Sam_CFD is offline   Reply With Quote

Old   April 7, 2015, 12:10
Default
  #8
Member
 
Muhammad Usman
Join Date: Feb 2014
Posts: 67
Rep Power: 3
13msmemusman is on a distinguished road
Thank you all i have solved problem using blockMesh
13msmemusman is offline   Reply With Quote

Reply

Tags
mesh generation, openfoam, salome, setfields

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
No layers in a small gap bobburnquist OpenFOAM Native Meshers: snappyHexMesh and Others 6 August 26, 2015 09:38
Hybrid mesh from Salome to OpenFOAM Sören Sander Open Source Meshers: Gmsh, Netgen, CGNS, ... 2 March 7, 2014 09:16
PorousZone using Mesh imported from Salome Rapha OpenFOAM 4 November 12, 2013 12:57
using METIS functions in fortran dokeun Main CFD Forum 7 January 29, 2013 05:06
[ICEM] Unstructure Meshing Around Imported Plot3D Structured Mesh ICEM kawamatt2 ANSYS Meshing & Geometry 17 December 20, 2011 12:45


All times are GMT -4. The time now is 01:59.