|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 9 ![]() |
Hello
When I run setFields I get the error: --> FOAM FATAL IO ERROR: Cannot find patchField entry for tank_patch20083 file: /home/josh/Desktop/cases/ICF4/full/case/0/alpha.water.boundaryField from line 26 to line 43. Prior to this error, I first run snappyHexMesh, which runs error free. Then the issue shouldn't be meshing. Many of these forums suggest this error should be a syntax error. However, I cannot find it. Here's my setFieldsDict Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 6.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object setFieldsDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // defaultFieldValues ( volScalarFieldValue alpha.water 0//only air in the domain ); regions ( boxToCell { box (0 2 0) (1 5 10); fieldValues ( volScalarFieldValue alpha.water 1//we set our block of water into the domain ); } ); // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object alpha.water; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0];//kg m s K mol A cd internalField uniform 0;//initially air in the entire domain - we will change that with setFields! boundaryField { lid { type inletOutlet; inletValue uniform 0; value uniform 0; } outlet { type inletOutlet; inletValue uniform 0; value uniform 0; } tank { type constantAlphaContactAngle; theta0 0; limit gradient; value uniform 0; } } // ************************************************************************* // |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,290
Rep Power: 30 ![]() ![]() |
Hello Josh,
setFields is throwing an error because there is a patch named "tank_patch20083" in the mesh, and there is no boundary condition defined in the alpha.water file for this patch. You can check what are the patches in your domain in the constant/polyMesh/boundary file :
Cheers, Yann |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
Senior Member
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 9 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,290
Rep Power: 30 ![]() ![]() |
You're welcome, I'm glad I could help.
The name "patch20083" is probably coming from your STL file. If this is an ASCII STL, you can open it in a text editor and search for the "solid" keyword. Next to "solid", you will see the name(s) of the surface(s) contained in the file (probably coming from the CAD tool you used to create the geometry) SHM will read the STL file, use the name you provide (tank) and append the surface names contained in the STL file to it (tank_patch20083) which allows to differentiate surfaces in order to use different surface refinement, patch types or layers specifications for each surface. Cheers, Yann |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Manual decomposition using setFields | RL-S | OpenFOAM Pre-Processing | 8 | July 3, 2023 08:51 |
SetFields SigSegV bug. | Archoncomando | OpenFOAM Pre-Processing | 4 | January 4, 2019 18:23 |
setFields not working | dsanza | OpenFOAM | 4 | October 18, 2018 09:43 |
rhoSimplecFoam with setFields | sino75 | OpenFOAM Pre-Processing | 0 | March 11, 2015 04:08 |
Problems with the execution of the setFields utility. | foamer | OpenFOAM Pre-Processing | 5 | June 3, 2013 12:24 |