CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

TopoSet - When to use it?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 21, 2019, 09:45
Unhappy TopoSet - When to use it?
  #1
New Member
 
Vitor Heitor Cardoso
Join Date: Jan 2019
Location: Rio de Janeiro
Posts: 10
Rep Power: 7
heitorvitorc is on a distinguished road
Dear CFD community,

I am currently working on a model to simulate a single-phased flow through several obstacles, but I am still a newbie when the subject is OpenFOAM. To do so, I use the Gmesh open-source mesh generator, and then i convert it to OpenFoam format. Seems ok to me. But When i try to simulate the problem, I get the error:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


PISO: Operating solver in PISO mode

Reading transportProperties

Reading field p



--> FOAM FATAL IO ERROR:

patch type 'patch' not constraint type 'empty'
for patch frontAndBack of field p in file "/mnt/c/Users/heitorvitorc/Desktop/OpenFOAM/Projetos/teste_10-01-19/0/p"

file: /mnt/c/Users/heitorvitorc/Desktop/OpenFOAM/Projetos/teste_10-01-19/0/p.boundaryField.frontAndBack from line 26 to line 26.

From function Foam::emptyFvPatchField<Type>::emptyFvPatchField(c onst Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::dictionary&) [with Type = double]
in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 80.

FOAM exiting



After a while I started to wonder if it is necessary to create a topoSetDict for this simulation, but the thought was totally random (I cant expose facts to prove the need for the topoSetDict).

When do I need to set the topoSetDict for a simulation? Is its setup related to simulations with free surfaces?
heitorvitorc is offline   Reply With Quote

Old   January 22, 2019, 16:23
Default
  #2
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 14
clapointe is on a distinguished road
Previously when I've made meshes with Gmsh, the converter worked fine but changed all patch times to the generic "patch"-- in constant/polyMesh/boundary. So I would go and change them back to what I wanted them to be (ie with sed). This will allow you to use the mesh.

Caelan
clapointe is offline   Reply With Quote

Old   January 23, 2019, 04:24
Default
  #3
Senior Member
 
Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 7
yambanshee is on a distinguished road
in your case: navigate to constant/polymesh/boundary. Near the top of this file you will see all your boundary names, along with some information about them. The important part of this is what their type is. Having never worked with gmsh, I assume it sets all the types to be of type patch. However, for working with a 2d mesh two of your boundaries should be of type empty (or 1 boundary if you lumped them together), and all walls should be of type wall.


When converting meshes, it's important to look at these definitions, and should be simple enough to edit manually. However, using a topoSetDict can allow openFoam to change these for you using a command. If the types are the only thing wrong, changing manually would be the simplest solution. I will however reiterate; I've never worked with mesh conversion, so I'm not sure what changes all would need to be made
yambanshee is offline   Reply With Quote

Old   January 23, 2019, 04:26
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26
Yann will become famous soon enough
Seeing the error message you get, I would say you try to run a 2D case and you have a patch named "frontAndBack" for the surfaces in the 3rd direction. The "frontAndBack" patch is defined as "empty" in every variable file in the 0 directory, but you get this error because "frontAndBack" needs to be defined as "empty" instead of "patch" in "constant/polyMesh/boundary" (or "processor*/constant/polyMesh/boundary" for a decomposed case)


Here is the generic explanation:

Every patch in the mesh has a base type: patch, wall, symmetryPlane, empty, etc...
The boundary conditions rely on these base types, which means there are specific boundary conditions for specific base types.

Have a look in the documentation about boundaries : https://www.openfoam.com/documentati...boundaries.php

As Caelan said, when you import your mesh in OpenFOAM, the converter sets the generic "patch" type to all patches in your mesh. You have to modify these base types in the "boundary" file if required. (ie. patch on the inlet and outlet patches, wall on wall patches, empty on side patches if you run a 2D case)

If you run your case in serial, you can manually edit the constant/polyMesh/boundary file. If you have a decomposed case, you can use "sed" as suggested by Caelan, or use the changeDictionary utility, to edit the boundary file in every processor* directory.
Yann is offline   Reply With Quote

Reply

Tags
openfoam 5.x, toposet, 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
fail to run series of runApplication topoSet -dict jiahui_93 OpenFOAM Programming & Development 1 May 25, 2022 12:56
[snappyHexMesh] Porous Media using TopoSet RobertoCirolini OpenFOAM Meshing & Mesh Conversion 3 August 30, 2016 08:34
[Other] cellLevel field not readable by topoSet blaise OpenFOAM Meshing & Mesh Conversion 0 June 30, 2015 04:35
[Other] topoSet Wrong number of faces. a19910112a OpenFOAM Meshing & Mesh Conversion 1 June 9, 2015 05:41
[snappyHexMesh] HOW to set a circular face by toposet Jessica OpenFOAM Meshing & Mesh Conversion 2 September 12, 2013 20:54


All times are GMT -4. The time now is 12:37.