solids4foam / solids4foam

The official repository for solids4foam
GNU General Public License v3.0
50 stars 30 forks source link

Error when deformation solver changed to RBF in perpendicularFlap tutorial #129

Open zonexo opened 1 month ago

zonexo commented 1 month ago

Hi, my perpendicularFlap case is working well. However, when I change the deformation solver to RBF, the simulation crashed at the start.

My dynamicMeshDict is:

solver RBFMeshMotionSolver;

RBFMeshMotionSolverCoeffs
{
    // Settings for the RBF solver
    staticPatches    (upperWall lowerWall);
    movingPatches    (flap);
    fixedPatches     (inlet outlet);
    interpolation
    {
        function     TPS;
    }
    coarsening
    {
        enabled      no;
    }
}

The log output is:

Selecting fluidModel pimpleFluid
Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: RBFMeshMotionSolver
Radial Basis Function interpolation: Selecting RBF function: TPS
RBF mesh deformation settings:
    interpolation function = TPS
    interpolation polynomial term = 0
    interpolation cpu formulation = 0
    coarsening = 0
        coarsening tolerance = 0.1
        coarsening reselection tolerance = 0.1
        coarsening two-point selection = 0
g field not found in constant directory: initialising to zero
No finite volume options present

Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
Selecting laminar stress model Stokes

PIMPLE: Operating solver in PISO mode

Constructing face velocity Uf

Courant Number mean: 1.03766 max: 3
Selecting solidModel linearGeometryTotalDisplacement
Selecting dynamicFvMesh staticFvMesh
Creating solidTraction boundary condition
Creating fixedDisplacement boundary condition
    under-relaxation method: fixed
Creating the mechanicalModel
Selecting mechanical law linearElastic
additionalMeshCorrection: yes
Selecting interfaceToInterfaceMapping directMap
Time = 0.01

Setting traction on solid interfaces
Mapping face values using directMap
Total force on fluid interface 0: (-812.444 0 0)
Total force on solid interface 0: (812.444 0 0)

Evolving solid solver
Solving the momentum equation for D
setCellDisplacements: reading cellDisplacements
    Corr, res, relRes, matRes, iters
    100, 0.000334926, 0.000252896, 0, 4
    200, 1.24789e-05, 6.42262e-06, 0, 9
    Both residuals have converged
    278, 9.83085e-07, 5.0568e-07, 0, 9

Mapping point values using directMap
Mapping point values using directMap
FSI relative residual1 norm for interface 0: 1
FSI residual2 norm for interface 0: 1
Time = 0.01, iteration: 1
Current fsi under-relaxation factor (fixed): 0.1
[2]
[2]
[2] --> FOAM FATAL ERROR: (openfoam-2312[3]
[3]
[3] --> FOAM FATAL ERROR: (openfoam-2312)
[3] Problem with fluid mesh motion solver selection
[3]
[3]     From fluidSolidInterface::moveFluidMesh()
[3]     in file fluidSolidInterfaces/fluidSolidInterface/fluidSolidInterface.C at line 1069.
[3]
FOAM parallel run aborting
[3]
[0]
[0]
[0] --> FOAM FATAL ERROR: (openfoam-2312)
[0] Problem with fluid mesh motion solver selection
[0]
[0]     From fluidSolidInterface::moveFluidMesh()
[0]     in file fluidSolidInterfaces/fluidSolidInterface/fluidSolidInterface.C at line 1069.
[0]
FOAM parallel run aborting
[0]
[1]
[1]
[1] --> FOAM FATAL ERROR: (openfoam-2312)
[1] Problem with fluid mesh motion solver selection
[1]
[1]     From fluidSolidInterface::moveFluidMesh()
[1]     in file fluidSolidInterfaces/fluidSolidInterface/fluidSolidInterface.C at line 1069.
[1]
FOAM parallel run aborting
[1]
)
[2] Problem with fluid mesh motion solver selection
[2]
[2]     From fluidSolidInterface::moveFluidMesh()
[2]     in file fluidSolidInterfaces/fluidSolidInterface/fluidSolidInterface.C at line 1069.
[2]
FOAM parallel run aborting
[2]
Maximal accumulated displacement of interface 0: 0.000974924
[0] [stack trace]
[0] =============
[0] #1  Foam::error::simpleExit(int, bool)[1] [stack trace]
[1] =============
[1] #1  Foam::error::simpleExit(int, bool)[2] [stack trace]
[2] =============
[2] #1  Foam::error::simpleExit(int, bool)[3] [stack trace]
[3] =============
[3] #1  Foam::error::simpleExit(int, bool) in  in  in  in /usr/lib/openfoam/openfoam2312/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so

Please suggest some help. Is it possible to use RBF? Thanks.

philipcardiff commented 1 month ago

Thanks @zonexo,

I am not sure why (or when) this broke. I have created a branch called fix-rbf, where I have pushed a change to avoid this initial error; however, the RBF solver is now not moving the mesh, and I am not sure. The RBF mesh solver is correctly called and seems to calculate a non-zero motion field but the mesh is not moved. There must be an error somewhere. Feel free to try out this branch and let me know if you find anything. I will come back to this when I get time.

By the way, I set incrementalResiduals to yes; in the perpendicularFlap/constant/fsiProperties as FSI loop was not converging with it set to no.

zonexo commented 1 month ago

Hi,

I tested on single and parallel and indeed the mesh is not moving.

Btw, when I compiled on Ubuntu 22.04 + OF 2312, there's no error but during tutorial tests, I got this:

Preparing testLoopReport

Preparing logs

Summary statistics
    Number of cases where a run was attempted: 47
    Number of cases where the solver failed: 4
    Number of cases where another command failed: 2

The solids4Foam solver failed in the following cases:
Application solids4Foam - case beamInCrossFlow: ** ERROR **
Application solids4Foam - case flexibleDamBreak: ** ERROR **
Application solids4Foam - case 3dTube/solid: ** ERROR **
Application solids4Foam - case flexibleOversetCylinder/solid: ** ERROR **

The following commands failed:
Application solids4Foam - case beamInCrossFlow: ** ERROR **
Application solids4Foam - case flexibleDamBreak: ** ERROR **
Application solids4Foam - case 3dTube/solid: ** ERROR **
Application pimpleFoam - case 3dTube/fluid: ** ERROR **
Application overPimpleDyMFoam - case flexibleOversetCylinder/fluid/cylinderAndBackground: ** ERROR **
Application solids4Foam - case flexibleOversetCylinder/solid: ** ERROR **
zonexo commented 1 month ago

Hi, is there any update on this issue? Hope it can get fix as RBF is much better than OF's laplacian solver. Thanks!

zonexo commented 3 weeks ago

Any update on the solution so far? Thanks.

philipcardiff commented 5 days ago

Any update on the solution so far? Thanks.

Apologies, @zonexo, I have not had time to look at this.

In the meantime, you may like to try the case on a different OpenFOAM version, e.g. foam extend, or try an earlier commit.