FlowModelingControl / flowtorch

flowTorch - a Python library for analysis and reduced-order modeling of fluid flows
GNU General Public License v3.0
131 stars 45 forks source link

FoamDataloader #42

Closed JOEJOEJOE1231231231231 closed 11 months ago

JOEJOEJOE1231231231231 commented 11 months ago

Hello: I ran my example on Linux this time, but still reported the following error. I tried other examples and reported the same error. But I ran your SVD decomposition code for the flow past a cylinder and it worked perfectly. So I checked the blockMesh file of the cylinder flow around the dataset you provided. The grid settings are as follows. Is this error related to this setting? image image

AndreWeiner commented 11 months ago

The error happens when parsing the mesh data. Are you sure a valid mesh was created (e.g., can you open and visualize the mesh in ParaView)? If so, there seems to be something wrong with the file header of constant/polyMesh/owner. Two options:

JOEJOEJOE1231231231231 commented 11 months ago

SandiaD_LTS1.zip This is a case in the openfoam/tutorials/collaboration/reatingFoam/RAS directory. I looked at the polymesh/owner file and it seems that there is indeed a problem, but I don't know how to solve it.The simulation time is 5000s. Due to limitations in the size of uploaded files, I deleted some files with time steps.And during the calculation process, the following errors may occur. Is this related to the above problem?

image

AndreWeiner commented 11 months ago

Thanks for uploading the case files. The problem is with your OpenFOAM version, which is a special compilation by some commercial company:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  dev
     \\/     M anipulation  |

   OpenFOAM for Windows 20.09 (v1)
   Built by CFD Support, www.cfdsupport.com (based on Symscape).
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      binary;
    class       labelList;
    note        "nPoints: 10613 nCells: 5170 nFaces: 20771 nInternalFaces: 10159";
    location    "constant/polyMesh";
    object      owner;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

As mentioned before, flowTorch only supports the ESI OpenFOAM version, which is the one available at www.openfoam.com Best regards, Andre

JOEJOEJOE1231231231231 commented 11 months ago

image This version doesn't work, does it?

AndreWeiner commented 11 months ago

No, that's openfoam.org.

JOEJOEJOE1231231231231 commented 11 months ago

Thank you !

JOEJOEJOE1231231231231 commented 10 months ago

Running code that pre calculates the unit center and volume can effectively solve this problem, and doing so can run flowtorch on the org version of Openfoam

AndreWeiner commented 10 months ago

Alright, good to know. Thanks for the feedback. Best, Andre