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

update of constant/polyMesh/boundary

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 24, 2016, 04:43
Default update of constant/polyMesh/boundary
  #1
New Member
 
Simon Johansson
Join Date: Sep 2011
Posts: 15
Rep Power: 15
Simjoh is on a distinguished road
I'm currently running a case where I use snappyHexMesh to generate my grid. The mesh is all good despite some small deficiencies at corners of my geometry but I can live with those.

I generate my case as the flange tutorķal and after the mesh generation I end up with one addidional boundary in constant/polyMesh/boundary. This extra boundary is the one created by blockMesh.

If I try to run the case as is It complains about the missing BC in the 0 folder for U and p_rgh for the boundary created by blockMesh. In the flange tutorial this boundary is called allBoundary.


The simulation do run if i manually delete the the allBoundary lines in contstant/polyMesh/boundary.

Is there any why to do this from the commandline or any built in openFOAM tools?
Simjoh is offline   Reply With Quote

Old   October 24, 2016, 05:13
Default
  #2
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 16
Antimony is on a distinguished road
Hi,

In the constant/polyMesh/boundary does the "allBoundary" patch have 0 faces?

If that is the case then you can run createPatch to remove zero-sized patches, though I would expect snappy to have already taken care of that.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   October 24, 2016, 05:21
Default
  #3
New Member
 
Simon Johansson
Join Date: Sep 2011
Posts: 15
Rep Power: 15
Simjoh is on a distinguished road
Thanks Antimony for at quick response.

Yes I guess it is zero since I got the nFaces 0;

This was the solution to my problem. There are a lot of complicated examples of createPachDict in the tutorials.
Since my case is simple without any moving parts i used tutorials/incompressible/simpleFoam/rotorDisk/system/createPatchDict. If I use this as is all the paches with zero faces will be removed
For the ones to lazy to find that file I attach the code form that file
Code:
 /*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
//       with transformations (i.e. cyclics).
pointSync false;

// Patches to create. An empty patch list just removes patches with zero
// faces from $FOAM_CASE/constant/polyMesh/boundary.
patches
(

);
// ************************************************************************* //
Simjoh is offline   Reply With Quote

Old   October 24, 2016, 05:39
Default
  #4
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 16
Antimony is on a distinguished road
Hi,

Used the attached as your createPatchDict to remove zero size patches.

Cheers,
Antimony
Attached Files
File Type: txt createPatchDict.txt (812 Bytes, 95 views)
Antimony is offline   Reply With Quote

Old   October 27, 2016, 04:48
Default
  #5
New Member
 
Erlend Grotle
Join Date: Jul 2016
Posts: 12
Rep Power: 10
erlend_grotle is on a distinguished road
This solved my problem nicely. I used the file shown in #3.
Then I copied polyMesh files from 0.01 folder to the constant folder and deleted 0.01.
Nice..:!!

BR
Erlend
erlend_grotle is offline   Reply With Quote

Old   October 27, 2016, 07:02
Default
  #6
New Member
 
Simon Johansson
Join Date: Sep 2011
Posts: 15
Rep Power: 15
Simjoh is on a distinguished road
I'm not familiar with the copy and paste procedure you are doing.
Maybe you could use

createPatch -overwrite
Simjoh is offline   Reply With Quote

Reply

Tags
snappyhexmesh


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
Change "Implicit Mesh Update Interval" using UDF ASimonsen Fluent UDF and Scheme Programming 2 October 12, 2017 10:38
Implicit mesh update restriction for faster calculation burning_bert Fluent UDF and Scheme Programming 1 May 28, 2017 17:59
libsampling for DyM solver exporting vtk patch. Problem to update geometry be_inspired OpenFOAM Post-Processing 3 October 9, 2015 08:58
[OpenFOAM] Update data in ParaView hpon ParaView 18 May 10, 2015 15:55
Using Workbench, CFX-Pre doesn't update mesh from upstream data Shawn_A CFX 2 November 25, 2012 14:06


All times are GMT -4. The time now is 13:42.