|
[Sponsors] |
[mesh manipulation] Using topoSet to create cellSet |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 29, 2019, 12:07 |
Using topoSet to create cellSet
|
#1 |
Member
Priyanka P
Join Date: Apr 2019
Location: Germany
Posts: 40
Rep Power: 7 |
Hello Everyone,
My geometry consists of three regions (hot, cold and pipe). And I want to generate a heat source on one face of the "hot" box/region. I created mesh in salome and then importing my UNV file to Openfoam using ideasUnvToFoam utility. And to create regions, I used splitMeshRegions command in command line. Following are the commands I used: Code:
ideasUnvToFoam heat_transfer.unv | tee log.ideasUnvToFoam splitMeshRegions -cellZones -overwrite | tee log.splitMeshRegions Can anyone please guide me how to do this? It would be a great help. Thank you. |
|
April 30, 2019, 02:27 |
|
#2 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
Hi,
You do not need a blockMeshDict file in order to access patches in your mesh. That information is also available in the boundary file located typically in constant/polyMesh. For topoSet itself, you need a topoSetDict which tells the code what to do. You can find a sample topoSetDict here: https://github.com/OpenFOAM/OpenFOAM...et/topoSetDict The best way forward is to choose the best option for you from the above link and use that to create whatever you want to create. Hope this helps. Cheers, Antimony |
|
April 30, 2019, 11:00 |
|
#3 |
Member
Priyanka P
Join Date: Apr 2019
Location: Germany
Posts: 40
Rep Power: 7 |
Hi.
Thank you so much for your reply. I tried using topoSet based on the requirement. My toposetDict is given below: Code:
FoamFile { version 2.0; format ascii; class dictionary; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( // wall { name hot; type faceSet; action new; source patchToFace; sourceInfo { name "hotFace"; } } // Select based on faceSet { name hotFaceCellSet; type cellSet; action new; source faceToCell; sourceInfo { set hot; // Name of faceSet //option neighbour; // cell with neighbour in faceSet //option owner; // ,, owner option any; // cell with any face in faceSet //option all; // cell with all faces in faceSet } } ) Code:
Create time Create polyMesh for time = 0 Reading topoSetDict Time = 0 mesh not changed. Created faceSet hot Applying source patchToFace Adding all faces of patch hotFace ... Found matching patch hotFace with 1092 faces. faceSet hot now size 1092 Created cellSet hotFaceCellSet Applying source faceToCell Adding cells according to faceSet hot ... cellSet hotFaceCellSet now size 1092 End Code:
Creating finite volume options from "constant/fvOptions" Selecting finite volume options model type scalarSemiImplicitSource Source: heatSource - selecting cells using cellSet hotFaceCellSet --> FOAM FATAL ERROR: Illegal content 4105 of set:hotFaceCellSet of type cellSet Value should be between 0 and 3956 From function void Foam::topoSet::check(Foam::label) in file sets/topoSets/topoSet.C at line 189. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::topoSet::check(int) at ??:? #3 Foam::cellSet::cellSet(Foam::polyMesh const&, Foam::word const&, Foam::IOobject::readOption, Foam::IOobject::writeOption) at ??:? #4 Foam::fv::cellSetOption::setCellSet() at ??:? #5 Foam::fv::cellSetOption::cellSetOption(Foam::word const&, Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:? #6 Foam::fv::option::adddictionaryConstructorToTable<Foam::fv::SemiImplicitSource<double> >::New(Foam::word const&, Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:? #7 Foam::fv::option::New(Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:? #8 Foam::fv::optionList::reset(Foam::dictionary const&) at ??:? #9 Foam::fv::optionList::optionList(Foam::fvMesh const&, Foam::dictionary const&) at ??:? #10 Foam::fv::options::options(Foam::fvMesh const&) at ??:? #11 ? at ??:? #12 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #13 ? at ??:? Aborted (core dumped) Now, I can see that my faceSet and cellSet is created and fvOption is also reading it, But there is some problem with my faceSet (highlighted above). I don't understand what I did wrong. Can you please guide me if possible? Thank you |
|
May 2, 2019, 03:59 |
|
#4 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
Hi,
You could remove the files/sets that you created via topoSet and then try again with topoSet and running your case. From the error message, it seems like you had an older version of your cellSet with more entries and hence that seems to have messed up with the latest version. Hope this helps. Cheers, Antimony |
|
May 2, 2019, 06:40 |
|
#5 |
Member
Priyanka P
Join Date: Apr 2019
Location: Germany
Posts: 40
Rep Power: 7 |
Thank you for your reply.
But I didn't get what do you exactly mean by older version of cellSet? where can I find that? because I don't have any cellSet before using topoSet. Once I run this topoSet command, then in the "sets" directory, I get two files (one is faceSet and one is cellSet). Below is the log file of my ideasUnvToFoam. Code:
Processing tag:2420 Skipping tag 2420 on line 9 Skipping section at line 9. Processing tag:2411 Starting reading points at line 20. Read 4174 points. Processing tag:2412 Starting reading cells at line 8371. First occurrence of element type 11 for cell 1 at line 8372 First occurrence of element type 41 for cell 280 at line 9209 First occurrence of element type 111 for cell 3749 at line 16147 Read 19434 cells and 3469 boundary faces. Processing tag:2467 Starting reading patches at line 55017. For group 1 named hotFace trying to read 253 patch face indices. For group 2 named pipe trying to read 8741 patch face indices. For group 3 named cold trying to read 4297 patch face indices. For group 4 named hot trying to read 6396 patch face indices. Of 3469 so-called boundary faces 261 belong to two cells and are therefore internal Sorting boundary faces according to group (patch) 0: hotFace is patch 1: pipe is cellZone 2: cold is cellZone 3: hot is cellZone Constructing mesh with non-default patches of size: hotFace 253 --> FOAM Warning : From function Foam::polyMesh::polyMesh(const Foam::IOobject&, const Foam::Xfer<Foam::Field<Foam::Vector<double> > >&, const cellShapeList&, const faceListList&, const wordList&, const wordList&, const Foam::word&, const Foam::word&, const wordList&, bool) in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 595 Found 2955 undefined faces in mesh; adding to default patch. Adding cell and face zones Cell Zone cold 4297 Cell Zone hot 6396 Cell Zone pipe 8741 End Above you can see, tha my cellZone "hot" has 6396 patch face indices. Code:
For group 4 named hot trying to read 6396 patch face indices. Now, I am trying to make a cellSet from the patch "hotFace" which is a patch in the cellZone "hot". and for that I am using the topoSetDict file which is given below. Code:
actions ( { name hot1; type faceSet; action new; source patchToFace; sourceInfo { name "hotFace"; } } // Select based on faceSet { name hotcell; type cellSet; action new; source faceToCell; sourceInfo { set hot1; // Name of faceSet //option neighbour; // cell with neighbour in faceSet //option owner; // ,, owner option any; // cell with any face in faceSet //option all; // cell with all faces in faceSet } } ); But I am getting this error: Code:
--> FOAM FATAL ERROR: Illegal content 8200 of set:hotcell of type cellSet Value should be between 0 and 6396 From function void Foam::topoSet::check(Foam::label) in file sets/topoSets/topoSet.C at line 189. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::topoSet::check(int) at ??:? #3 Foam::cellSet::cellSet(Foam::polyMesh const&, Foam::word const&, Foam::IOobject::readOption, Foam::IOobject::writeOption) at ??:? #4 Foam::fv::cellSetOption::setCellSet() at ??:? #5 Foam::fv::cellSetOption::cellSetOption(Foam::word const&, Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:? #6 Foam::fv::option::adddictionaryConstructorToTable<Foam::fv::SemiImplicitSource<double> >::New(Foam::word const&, Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:? #7 Foam::fv::option::New(Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:? #8 Foam::fv::optionList::reset(Foam::dictionary const&) at ??:? #9 Foam::fv::optionList::optionList(Foam::fvMesh const&, Foam::dictionary const&) at ??:? #10 Foam::fv::options::options(Foam::fvMesh const&) at ??:? #11 ? at ??:? #12 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #13 ? at ??:? Aborted (core dumped) I don't understand why is it taking invalid values, while I don't have any other(or older cellSet) ? Am I making any mistake in making the topoSetDict file? Thank you |
|
May 7, 2019, 22:36 |
|
#6 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
Hi,
There doesn't seem to be anything wrong with your topoSetDict. There seems to be an issue with numbering by the looks of it, which in turn is causing issues for you. I have never used ideasUnvToFoam, so am not sure if there is some flag or setting that you need to use so that other OF operations can be performed on the converted mesh. Cheers, Antimony |
|
Tags |
cellset, fvoption, openfoam, toposet |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
creating square patch (for air inlet) on the bottom face using cellset in toposet | Rajesh Nimmagadda | OpenFOAM Running, Solving & CFD | 0 | October 31, 2017 13:27 |
Possible to create cyliner baffle (internal) using topoSet or stl Mesh? | keepfit | OpenFOAM | 4 | February 19, 2017 15:40 |
[OpenFOAM] Create cellSet from paraFoam | hcl734 | ParaView | 0 | November 20, 2015 05:09 |
[mesh manipulation] how to create CellZones or cellSet from mesh | didamiamia | OpenFOAM Meshing & Mesh Conversion | 0 | July 11, 2013 12:28 |
Actuator disk model | audrich | FLUENT | 0 | September 21, 2009 08:06 |