CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

How to create a torus region using topoSet

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 20, 2024, 08:27
Default How to create a torus region using topoSet
  #1
vjp
New Member
 
Join Date: Aug 2021
Location: France
Posts: 7
Rep Power: 4
vjp is on a distinguished road
Hello everyone,

I would like to use a torus region with topoSet but I don't know how to do it.
I already used cylinderToCell, cylinderAnnulusToCell in topoSetDict to post-process some regions but I don't find a way to create a torus region or a volume of revolution around an axis.

Can anyone help me

Thanks in advance
vjp is offline   Reply With Quote

Old   March 31, 2024, 23:04
Default
  #2
New Member
 
Wesley Alexander
Join Date: Mar 2024
Posts: 1
Rep Power: 0
liftsolemn is on a distinguished road
Using the surfaceToCell source, you may use OpenFOAM depending on your version to choose cells inside a surface geography. You ought to be able to obtain what you want if you specify your shape as an STL file.

Last edited by liftsolemn; April 1, 2024 at 22:04.
liftsolemn is offline   Reply With Quote

Old   April 2, 2024, 10:31
Default
  #3
vjp
New Member
 
Join Date: Aug 2021
Location: France
Posts: 7
Rep Power: 4
vjp is on a distinguished road
Hello liftsolemn,

Thanks for your answer!

I try to do what you explain (the surface specified with the STL file is not torus, it is a cylinder):


Quote:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 8
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

actions
(
{
name cylindre; // Name of the set
type cellSet; // Set type

action new; // Create a new set
source surfaceToCell; // Use cells as the source
sourceInfo
{
file "constant/triSurface/cylindre.stl";
useSurfaceOrientation false;
outsidePoints ((0 0.03 0));
includeCut true;
includeInside true;
includeOutside false;
nearDistance -1;
curvature -100;

}
}
{
name centre;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set cylindre;
}

}
);

// ************************************************** *********************** //
I define my surface with the stl file "cylindre.stl" but when I run
Quote:
topoSet | tee 2>&1 4-topoSet.log
I have always
Quote:
cellSet cylindre now size 0
Created cellZoneSet centre
Applying source setToCellZone
Adding all cells from cellSet cylindre ...
cellZoneSet centre now size 0
It seems that there is nothing inside my surface but i don't understand why. The outsidePoint is outside the surface created.
vjp is offline   Reply With Quote

Old   June 4, 2024, 05:37
Default
  #4
New Member
 
Olivia Finney
Join Date: Jan 2024
Posts: 2
Rep Power: 0
Oliviajsdkf is on a distinguished road
Quote:
Originally Posted by vjp View Post
Hello everyone, slope game

I would like to use a torus region with topoSet but I don't know how to do it.
I already used cylinderToCell, cylinderAnnulusToCell in topoSetDict to post-process some regions but I don't find a way to create a torus region or a volume of revolution around an axis.

Can anyone help me

Thanks in advance
In your topoSetDict file, add the following under the "actions" section:
yaml
Copy
- name: torus
type: cellToCell
action: new
source:
type: torus
point1: [x1, y1, z1]
point2: [x2, y2, z2]
majorRadius: R1
minorRadius: R2
Replace the following values:

[x1, y1, z1]: Coordinates of the center of the torus
[x2, y2, z2]: Coordinates of a point on the torus axis
R1: Major radius of the torus
R2: Minor radius of the torus
Run the topoSet command to create the torus region:
python
Copy
topoSet -dict topoSetDict -name torus
This will create a new cell set named "torus" that contains all the cells within the specified torus region.

You can then use this cell set for further post-processing or visualization in OpenFOAM.
Oliviajsdkf is offline   Reply With Quote

Reply

Tags
mesh, openfoam, toposetdict


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
[Other] splitMeshRegions does not create interface patch between regions fsan OpenFOAM Meshing & Mesh Conversion 10 June 6, 2022 05:56
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
[blockMesh] Include list of points Hikachu OpenFOAM Meshing & Mesh Conversion 0 June 20, 2011 09:03
Actuator disk model audrich FLUENT 0 September 21, 2009 07:06
Where's the singularity/mesh flaw? audrich FLUENT 3 August 4, 2009 01:07


All times are GMT -4. The time now is 00:45.