CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Salome] how to setFields in openFOAM when you have imported mesh from salome or other package (https://www.cfd-online.com/Forums/openfoam-meshing/140175-how-setfields-openfoam-when-you-have-imported-mesh-salome-other-package.html)

13msmemusman August 9, 2014 14:35

how to setFields in openFOAM when you have imported mesh from salome or other package
 
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

jokerito August 29, 2014 04:11

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

Sam_CFD April 7, 2015 01:07

setFields for 2 phase_3D_imported_ICEMCFD
 
1 Attachment(s)
Quote:

Originally Posted by jokerito (Post 508297)
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

TobM April 7, 2015 02:36

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.

Sam_CFD April 7, 2015 04:58

co-ordinate points in paraview
 
Quote:

Originally Posted by TobM (Post 540251)
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

TobM April 7, 2015 05:05

You can use the Ruler under Sources to get your coordinates.

Sam_CFD April 7, 2015 08:16

Can not see alphs in paraview
 
Quote:

Originally Posted by TobM (Post 540281)
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

13msmemusman April 7, 2015 12:10

Thank you all i have solved problem using blockMesh

ahr February 28, 2017 09:26

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.

aks017 April 30, 2019 03:24

Can you tell me, how u solved the problem?

vava10 November 25, 2020 16:42

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

afshindpe May 18, 2022 07:30

How to use STL file as a setField?
 
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


All times are GMT -4. The time now is 18:53.