nextfoam / baram

CFD for Everyone
https://baramcfd.org/
GNU General Public License v3.0
100 stars 17 forks source link

BaramMesh unable to Castellate an STL file with a name starting with a number #102

Closed Aaarrrggghhhh closed 3 months ago

Aaarrrggghhhh commented 3 months ago

Describe the bug Castellation aborts at start of Castellation

To Reproduce Steps to reproduce the behavior: Import geometry into BaramMesh. Make one of the files start with a number (ex. "6deghydrofoil.stl"). Geometry will appear to import correctly Follow steps to create fluid area, base grid. these steps will work. Select castellation - select the surfaces from the above file. The process aborts shortly after being initiated.

if same file is renamed without a number at start, the process works fine. **Expected behavior** That the castellation process is not aborted. **Screenshots** If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: Windows 11 Home **Additional context** /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2312 | --> FOAM FATAL IO ERROR: (openfoam-2312) | \\ / A nd | Website: www.openfoam.com | Expected a '(' or a '{' while reading List, found on line 15: word 'BigNWeird_surface.stl' | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ file: system/snappyHexMeshDict at line 15. Build : 697ea218-20240521 OPENFOAM=2312 version=v2312 Arch : "LSB;label=32;scalar=64" From char Foam::Istream::readBeginList(const char*) Exec : C:\Users\\AppData\Local\Programs\BARAM\solvers\openfoam\bin\snappyHexMesh in file db/IOstreams/IOstreams/Istream.C at line 185. Date : Aug 01 2024 Time : 21:34:31 FOAM exiting Host : PID : 22708 I/O : uncollated Case : C:/Users//Documents/baramflow/test_for_git/case nProcs : 1 trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 0, maxFileModificationPolls 20) allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Read mesh in = 0.009 s
jiban commented 3 months ago

Hi @Aaarrrggghhhh, Thank you for the report. In fact, the problem comes from the dictionary format of OpenFOAM. OpenFOAM cannot handle names that start with digits. BARAM may check the input file name for validity in the future. Thank you.

Best regards, Jake

Aaarrrggghhhh commented 3 months ago

Thanks Jake, It would be great to check that file name in the future