CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

creating patch with surfacetopatch

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   October 21, 2020, 12:37
Default creating patch with surfacetopatch
New Member
Join Date: Oct 2020
Posts: 16
Rep Power: 2
fidu is on a distinguished road
Hi everyone

I have a stl file with different faces where I would like to change the temperature of some selected faces. To achieve that I have selected this faces and copied them in the heating.stl file, while they are still present in the original and the coordinates are preserved. I tried to run surfacetopatch but got the following error while running the solver:
[0] No PatchFunction1 dictionary entry: d

[0] file: /mnt/c/Users/david/Desktop/working_cases/work/david_new_stl_patch/processor0/0/U.boundaryField.inlet at line 27 to 34.
[0]     From static Foam::autoPtr<Foam::PatchFunction1<Type> > Foam::PatchFunction1<Type>::New(const Foam::polyPatch&, const Foam::word&, const Foam::dictionary&, bool) [with Type = double]
[0]     in file /home/pawan/OpenFOAM/OpenFOAM-v2006/src/meshTools/lnInclude/PatchFunction1New.C at line 45.
FOAM parallel run exiting
My procedere so far was:
  1. blockMesh
  2. surfaceFeatureExtract
  3. snappyHexMesh -overwrite
  4. surfaceToPatch -tol 1e-6 constant/triSurface/scaled_heating.stl
  5. checkMesh
  6. decomposePar
  7. mpirun -n 4 buoyantBoussinesqSimpleFoam -parallel

And when I replace the entire polymesh folder with new one, which was generated from surfaceTopatch at the Directory 1/polyMesh, I get the following error while running decomposePar:

Cannot find patchField entry for heating

file: /mnt/c/Users/david/Desktop/working_cases/work/david_new_stl_patch/0/cellLevel.boundaryField at line 27 to 39.

    From void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::readField(const Foam::DimensionedField<TypeR, GeoMesh>&, const Foam::dictionary&) [with Type = double; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh]
    in file /home/pawan/OpenFOAM/OpenFOAM-v2006/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 172.

FOAM exiting
As I understand it cellLevel was generated by snappyhexMesh which in term supplies the information for the surfacetopatch function. How can I solve this?

What do I have to change?

Thanks in advance

Best Regards

fidu is offline   Reply With Quote

Old   November 2, 2020, 04:35
New Member
Join Date: Oct 2020
Posts: 16
Rep Power: 2
fidu is on a distinguished road
I found the solutions.I just had to remove 0/cellLevel 0/pointLevel after running snappyHexmesh and change the patch type of constant/polymesh/bountary.T to wall instead of patch.

Best David
fidu is offline   Reply With Quote


boundary condition, patch, pre-proccessing, surfacetopatch

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Cyclic Boundary Condition Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Running, Solving & CFD 36 July 2, 2012 12:23
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 17:51
CheckMeshbs errors ivanyao OpenFOAM Running, Solving & CFD 2 March 11, 2009 02:34
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12

All times are GMT -4. The time now is 22:07.