|
[Sponsors] |
May 5, 2023, 13:29 |
setFieldsDict - Ellipse
|
#1 |
New Member
Alp
Join Date: May 2023
Posts: 1
Rep Power: 0 |
Hello everyone,
I am working on an Openfoam assignment at my university. For this assignment, I need to use setFieldsDict and define an ellipsoid volume or region ( It is 3D) and set different values for inside and outside of the ellipsoid region. But I could not find any documentation on defining an ellipsoid region in setFields. I could manage to do it with funkySetFields which is below. In this funkysetfields an ellipsoid is defined and inside the ellipsoid thermal diffusivity for sand is valid, outside of this ellipsoid diffusivity of aluminum is valid. Code:
FoamFile { version 2.0; format ascii; root ""; case "defective cooler"; instance "system"; local ""; class dictionary; object funkySetFieldsDict; } expressions ( aAluminum { field a; expression "8.418e-5"; condition "sqr((pos().x-0.003))/(sqr(0.015))+sqr((pos().y-0.0045))/(sqr(0.0007))+sqr((pos().z-0.003))/(sqr(0.001))>1"; // This equation describes the inside or outside of an ellipsoid. } aSand { field a; expression "1-12e-6"; condition "sqr((pos().x-0.003))/(sqr(0.015))+sqr((pos().y-0.0045))/(sqr(0.0007))+sqr((pos().z-0.003))/(sqr(0.001))<1"; } ); Question : I need to do the same thing with OpenFOAM V10, setFieldsDict. How can I do the same thing, in setFieldsDict? Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 10 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { format ascii; class dictionary; object setFieldsDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // defaultFieldValues ( volScalarFieldValue a 8.418e-5 ); regions ( // Setting values inside a sphere sphereToCell { centre (0.015 0.0045 0.003); radius (0.003 0.007 0.001); // I tried to give 3 radiui assuming in 3D, but this did not work of course :)// fieldValues ( volScalarFieldValue a 1.12e-6 ); } ); // ************************************************************************* // |
|
June 9, 2023, 01:01 |
|
#2 |
New Member
Join Date: Jun 2023
Posts: 1
Rep Power: 0 |
Did you have the answer for this issue?
__________________
Last edited by Binsuna; June 11, 2023 at 10:34. |
|
Tags |
ellipse, setfieldsdict |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[blockMesh] problem with the ellipse curvededge | alvin11 | OpenFOAM Meshing & Mesh Conversion | 6 | December 9, 2024 08:27 |
sintax rules to compile setFieldsDict | leske | OpenFOAM Pre-Processing | 2 | January 21, 2016 16:58 |
[Other] Meshing an ellipse | Sujatha | OpenFOAM Meshing & Mesh Conversion | 10 | January 31, 2014 20:58 |
2D rotating ellipse (domain interface??) | Kambusha | CFX | 38 | May 19, 2012 08:10 |
[GAMBIT] 2D ellipse in rectangular domain | rieuk | ANSYS Meshing & Geometry | 8 | October 7, 2010 09:52 |