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

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

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Sam_CFD
  • 1 Post By TobM

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 9, 2014, 15: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: 91
Rep Power: 0
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, 05:11
Default
  #2
New Member
 
Join Date: Jul 2014
Posts: 22
Rep Power: 12
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, 02:07
Post setFields for 2 phase_3D_imported_ICEMCFD
  #3
New Member
 
Join Date: Mar 2015
Posts: 15
Rep Power: 11
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, 83 views)
ahr likes this.
Sam_CFD is offline   Reply With Quote

Old   April 7, 2015, 03:36
Default
  #4
Member
 
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 12
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, 05:58
Default co-ordinate points in paraview
  #5
New Member
 
Join Date: Mar 2015
Posts: 15
Rep Power: 11
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, 06:05
Default
  #6
Member
 
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 12
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, 09:16
Default Can not see alphs in paraview
  #7
New Member
 
Join Date: Mar 2015
Posts: 15
Rep Power: 11
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, 13:10
Default
  #8
Member
 
Muhammad Usman
Join Date: Feb 2014
Posts: 91
Rep Power: 0
13msmemusman is on a distinguished road
Thank you all i have solved problem using blockMesh
13msmemusman is offline   Reply With Quote

Old   February 28, 2017, 10:26
Default
  #9
ahr
New Member
 
ahr
Join Date: Feb 2017
Posts: 4
Rep Power: 9
ahr is on a distinguished road
I have create a field for temperature.

but I do not know where to write the value for the field.

Im new in openfoam stuff.
ahr is offline   Reply With Quote

Old   April 30, 2019, 04:24
Default
  #10
New Member
 
Akshay Ravi
Join Date: Apr 2019
Posts: 4
Rep Power: 7
aks017 is on a distinguished road
Can you tell me, how u solved the problem?
aks017 is offline   Reply With Quote

Old   November 25, 2020, 17:42
Question
  #11
Member
 
Deutschland
Join Date: Sep 2020
Posts: 69
Rep Power: 6
vava10 is on a distinguished road
Hey,

I and trying to use setField on a background cuboid which I created using Salome. you can find the file in https://drive.google.com/file/d/10BI...ew?usp=sharing. I want to know the dimensions of the cuboid and coordinate of the edges which I created so that I can apply setFields to make it part water and part air. Can anyone suggest me how to obtain it?

Thank you in advance for the help

Kind regards
vava10
vava10 is offline   Reply With Quote

Old   May 18, 2022, 08:30
Default How to use STL file as a setField?
  #12
New Member
 
Afshin Davarpanah
Join Date: Oct 2021
Posts: 5
Rep Power: 5
afshindpe is on a distinguished road
Hello

Everyone

I want to perform a simulation with interfoam and I need to define the setField (with a STL file)? How can I do it?

Thanks
afshindpe is offline   Reply With Quote

Reply

Tags
mesh generation, openfoam, salome, setfields


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
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
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 10:51.