CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   creating patch with surfacetopatch (https://www.cfd-online.com/Forums/openfoam-pre-processing/231107-creating-patch-surfacetopatch.html)

fidu October 21, 2020 12:37

creating patch with surfacetopatch
 
Hi everyone :D

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:
Code:

[0]
[0]
[0] --> FOAM FATAL IO ERROR:
[0] No PatchFunction1 dictionary entry: d

[0]
[0]
[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]
[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.
[0]
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:

Code:

--> FOAM FATAL IO ERROR:
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

fidu November 2, 2020 04:35

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


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