CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM CC Toolkits for Fluid-Structure Interaction (https://www.cfd-online.com/Forums/openfoam-cc-toolkits-fluid-structure-interaction/)
-   -   [solids4Foam] Master point addressing is not correct! (https://www.cfd-online.com/Forums/openfoam-cc-toolkits-fluid-structure-interaction/220396-solids4foam-master-point-addressing-not-correct.html)

amuzeshi September 5, 2019 15:59

[solids4Foam] Master point addressing is not correct!
 
Hi,
I am on a simulation of deformation of a solid body due to fluid flow using solids4Foam. Since I faced with the divergence of the simulation, I tried more stiff solid, then gradually loosen it every 5s of physical time of the problem. The last time that I loosen it (say at t=20s) and started solids4Foam, I got the following error:
Code:

--> FOAM FATAL ERROR:
Master point addressing is not correct

I've also specified at system/controlDict:
Code:

startFrom latestTime;
It is strange, because this error does not appear when I stop the simulation,change the stiffness and start the simulation again at t= 5, 10 , 15s. Does anyone know, what is the problem?

amuzeshi September 6, 2019 07:31

2 Attachment(s)
As I understood, in the latest time step, there are some intersection points between solid and fluid interface zones. In the attached figure, red zones are fluid zone and white zones are solid zone. Does this intersection cause the problem of:
Code:

Extended GGI, master point distance, max: 1e+15, avg: 4.16667e+13, min: -0.0181481


--> FOAM FATAL ERROR:
Master point addressing is not correct

???

I think using conforming mesh is helpful, because it may cause avoiding the problem of intersection of zones, may it?

amuzeshi September 6, 2019 07:49

Another workaround for this problem is to use time varying stiffness rather than stopping the simulation and re-starting it by a different stiffness (Young's modulus). But does anyone (specifically bigphil) know how to implement it in constant/solid/mechanicalProperties ?
(I think it would be better to post this as a new thread in order to make it more easy to be searched.)

Daniel_Khazaei September 7, 2019 04:39

Quote:

Originally Posted by amuzeshi (Post 744039)
Another workaround for this problem is to use time varying stiffness rather than stopping the simulation and re-starting it by a different stiffness (Young's modulus). But does anyone (specifically bigphil) know how to implement it in constant/solid/mechanicalProperties ?
(I think it would be better to post this as a new thread in order to make it more easy to be searched.)

Dear Ali,

That error is due to the intersection of the boundaries at the interface which means the implicit fsi coupling loop could not achieve proper convergence within the specified max number of iteration.

I guess you didn't receive this error before stopping the simulation for another restart due to the fact that you have not set the interpolator to get updated during the simulation! If you did so, you would have received the exact same error!

For the time varying Young modulus and If you are using a linear elastic material model for the solid part, just create a new material model based on the following class:

Code:

src/solids4FoamModels/materialModels/mechanicalModel/mechanicalLaws/linearGeometryLaws/linearElastic
There you can see that E_ can be read or calculated based on the available data provided by the user in constant/solid/mechanicalProperties! You need to modify this class to make E_ time dependent and don not forget to include E_ calculation in correct(...) functions so it can be updated as the simulation goes on!

From the physical point of view and I'm not an expert in solid mechanics (@bigphil can help us here), do you expect a final steady-state result?
Let me explain myself better, consider these two scenarios:

1- Set Young modulus to the real value from the beginning of the simulation and run the case for 30 seconds.

2- Define Young modulus using time dependent formulation and run the case for 30 seconds.

Do you expect an identical final deformation for both cases?

Regards,
D. Khazaei

amuzeshi September 8, 2019 02:32

1 Attachment(s)
Hi Daniel,

Quote:

Originally Posted by Daniel_Khazaei (Post 744089)
Dear Ali,
I guess you didn't receive this error before stopping the simulation for another restart due to the fact that ...

Yes!
Quote:

you have not set the interpolator to get updated during the simulation! If you did so, you would have received the exact same error!
In constant/fsiProperties we have
Code:


    // 0 means the interpolator is update every time-step, whereas 10 would be
    // every 10 time-steps
    // Defaults to 0
    // interpolatorUpdateFrequency 0;

Do you mean default value of 0 is not used? In other words, there is no option to turn interpolator off during the simulation (unless deactivation of these lines causes it).
Quote:


For the time varying Young modulus and If you are using a linear elastic material model for the solid part, just create a new material model based on the following class:

Code:

src/solids4FoamModels/materialModels/mechanicalModel/mechanicalLaws/linearGeometryLaws/linearElastic
There you can see that E_ can be read or calculated based on the available data provided by the user in constant/solid/mechanicalProperties! You need to modify this class to make E_ time dependent and don not forget to include E_ calculation in correct(...) functions so it can be updated as the simulation goes on!
I intended to create a linearly time-varying 'E' based on:
Code:

E(t) = (EDesired - EStart) * (t)/(tDesired) + EStart
Which assumes our startTime as '0'.
In order to do so, I tried to modify neoHookeanElastic. The modified version, however, is not compiled successfully till now. The major modifications in *.C are:
Code:

//** Constructors **//
.
.
.
    EDesired_(dict.lookup("EDesired")),
    EStart_(dict.lookup("EStart")),
    tDesired_(dict.lookup("tDesired")),
    E_
    (
        IOobject
        (
            "E",
            mesh.time().timeName(),
            mesh,
            IOobject::READ_IF_PRESENT,
            IOobject::AUTO_WRITE
        ),
        mesh,
        dimensionedScalar("zero", dimPressure, 0.0)
        calcE()
    )
//** Private Member Functions **//
.
.
.
Foam::tmp<Foam::volScalarField>
Foam::neoHookeanElasticTimeVaryingE::calcE() const
{
    scalar current_time((mesh.time()).value());

    if (current_time < tDesired_.value())
    {
        return
        (
            (EDesired_ - EStart_)/tDesired*(current_time ) + EStart
        );
    }
    else
    {
        return
        (
            EDesired_
        );
    }
}

Those modifications in *.H are:
Code:

    public mechanicalLaw
{
    // Private data

        .
        .
        .

        // Young's modulus
        volScalarField          E_;
        .
        .
        .

    // Member Functions

        //- Return the time varying E
        const volScalarField& E() const
        {
            return E_;
        }

        //- Correct E
        void correct()
        {
            E_ = calcE();
        }

For more information, I've attached the files.
Quote:


From the physical point of view and I'm not an expert in solid mechanics (@bigphil can help us here), do you expect a final steady-state result?
Let me explain myself better, consider these two scenarios:

1- Set Young modulus to the real value from the beginning of the simulation and run the case for 30 seconds.

2- Define Young modulus using time dependent formulation and run the case for 30 seconds.

Do you expect an identical final deformation for both cases?

Yes, I expect an identical final deformation, but not in the same time span; Neglecting simulation issues, we expect the final steady state deformation to be reached sooner when we set its real 'E' which is relatively loose than when we approach this value from stiffer materials during the time.

Daniel_Khazaei September 8, 2019 09:20

Quote:

Originally Posted by amuzeshi (Post 744133)
Hi Daniel,

Yes!

In constant/fsiProperties we have
Code:


    // 0 means the interpolator is update every time-step, whereas 10 would be
    // every 10 time-steps
    // Defaults to 0
    // interpolatorUpdateFrequency 0;

Do you mean default value of 0 is not used? In other words, there is no option to turn interpolator off during the simulation (unless deactivation of these lines causes it).

interpolatorUpdateFrequency defaults to 0, therefore commenting out that line is equivalent of setting it to 0.
Although it is written that "0 means the interpolator is updated every time-step", this piece of code in fluidSolidInterface.C which is responsible of updating interpolator is doing things differently! It doesn't update interpolator every time-step when interpolatorUpdateFrequency is set to 0: (take a look at the red line)

Code:

void Foam::fluidSolidInterface::updateInterpolatorAndGlobalPatches()
{
    if (!ggiInterpolatorPtr_)
    {
        ggiInterpolator();
    }
    else if (interpolatorUpdateFrequency_ != 0)
    {
        if (((runTime().timeIndex() - 1) % interpolatorUpdateFrequency_) == 0)
        {
            deleteDemandDrivenData(ggiInterpolatorPtr_);
            fluid().clearGlobalPatch();
            solid().clearGlobalPatch();
            fluid().makeGlobalPatch
            (
                fluidMesh().boundaryMesh()[fluidPatchIndex_].name()
            );
            solid().makeGlobalPatch
            (
                solidMesh().boundaryMesh()[solidPatchIndex_].name()
            );
            ggiInterpolator();
        }
    }
}

This means when the interpolatorUpdateFrequency is set to 0, the interpolator is created only once at the beginning of the simulation without further update during the simulation!

Quote:

Originally Posted by amuzeshi (Post 744133)
I intended to create a linearly time-varying 'E' based on:
Code:

E(t) = (EDesired - EStart) * (t)/(tDesired) + EStart
Which assumes our startTime as '0'.
In order to do so, I tried to modify neoHookeanElastic.
...

For more information, I've attached the files.

I will prepare a time varying version for you when I have free time.

Regards,
D. Khazaei

Daniel_Khazaei September 8, 2019 11:02

2 Attachment(s)
find the modified version of both linearElastic and neoHookeanElastic below;)
successfully compiled on foam-extend-4.0 but didn't have time to run a case...

amuzeshi September 11, 2019 07:24

Dear Daniel,
I ran a case with timeVaryingNeoHookean model, without any problem.

Sincerely,
Ali

philippconen September 27, 2021 08:59

3 Attachment(s)
Dear Foamers,

regarding my thesis, I am working on an FSI for an aircraft wing.

I run the "microBeamInCrossFlow" tutorial case and it works.

I wanted to have the exact setup, but with the geometry of my wing model. So I exported the existing case from ANSYS and imported it with
Code:

fluentMeshToFoam -writeZones
. I made a case for the mechanical case as well as for the fluid case and copied the polyMesh directories of both meshes to the corresponding directories in the FSI case. I changed the boundaries in the 0 folder.

When I now run solids4Foam I get the message: "Master point addressing is not correct..".
Since I read this thread and tried to play around with the parameters I have no idea what I am looking for to fix this error. Could it be, that the mesh is broken? Do you have any other ideas?

Here I like to present my case:
https://github.com/Philipp-Conen/Ope...aftWing2-W-FSI

And pictures are attached.

Here you can see the log:
Code:

solids4Foam
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | foam-extend: Open Source CFD                    |
|  \\    /  O peration    | Version:    4.1                                |
|  \\  /    A nd          | Web:        http://www.foam-extend.org        |
|    \\/    M anipulation  | For copyright notice see file Copyright        |
\*---------------------------------------------------------------------------*/
Build  : 4.1-70b064d0f326
Exec  : solids4Foam
Date  : Sep 27 2021
Time  : 14:53:09
Host  : "philipp-MS-7A38"
PID    : 27236
CtrlDict : "/home/philipp/foam/philipp-4.1/run/OF/2021_09_27/crossFlow_Own/system/controlDict"
Case  : /home/philipp/foam/philipp-4.1/run/OF/2021_09_27/crossFlow_Own
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

/*---------------------------------------------------------------------------*\
|    For further information on the solids4Foam toolbox implementations,      |
|    please see the following publications:                                  |
|                                                                            |
|    P. Cardiff, A Karac, P. De Jaeger, H. Jasak, J. Nagy, A. Ivankovic,      |
|    Z. Tukovic: An open-source finite volume toolbox for solid mechanics and |
|    fluid-solid interaction simulations. arXiv:1808.10736v2, 2018, available |
|    at https://arxiv.org/abs/1808.10736.                                    |
|                                                                            |
|    Z. Tukovic, A. Karac, P. Cardiff, H. Jasak, A. Ivankovic: OpenFOAM      |
|    finite volume solver for fluid-solid interaction.  Transactions of      |
|    Famena, 42 (3), pp. 1-31, 2018, 10.21278/TOF.42301.                      |
\*---------------------------------------------------------------------------*/

Selecting physicsModel fluidSolidInteraction

Selecting fluidSolidInterface method Aitken

Selecting fluidModel icoFluid
Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: velocityLaplacian
Selecting motion diffusion: quadratic
Selecting motion diffusion: inverseDistance
g field not found in constant directory: initialising to zero
Selecting solidModel nonLinearGeometryUpdatedLagrangian
Selecting dynamicFvMesh staticFvMesh
Creating fixedDisplacement boundary condition
Creating solidTraction boundary condition
    limiter coefficient: 1
    under-relaxation method: fixed
Creating the mechanicalModel
Selecting mechanical law neoHookeanElastic
additionalMeshCorrection: false
Selecting interfaceToInterfaceMapping GGI
Courant Number mean: 2.74902e-06 max: 0.00510776 velocity magnitude: 30
deltaT = 1.2e-06
Time = 1.2e-06

Setting traction on solid interfaces
Interpolating face values using GGI
Create GGI zone-to-zone interpolator
interface-to-interface face error: 0.0847933
calcMasterPointAddressing() const
Extended GGI, master point distance, max: 1e+15, avg: 3.5137e+11, min: -1.08721e-14


--> FOAM FATAL ERROR:
Master point addressing is not correct

    From function GGIInterpolation::masterToSlavePointInterpolate(const Field<Type> pf)
    in file /home/philipp/foam/foam-extend-4.1/src/foam/lnInclude/GGIInterpolation.C at line 492.

FOAM aborting

Abgebrochen (Speicherabzug geschrieben)


philippconen September 27, 2021 10:04

While cross reading this thread:
https://www.cfd-online.com/Forums/op...d-turbine.html
I tried to increase the solid mesh.

Switching the element size from 0.005mm to 0.001mm results in hugh mesh with 1.7 million cells.

I was able to get rid of the mentioned error. But after one iteration the solver just stops without a foam error message, but a floating point exception (memory dump written).

After some tries I get to know that:
- With 0.002mm element size: Master point error
- With 0.0015mm element size: Floating point exception

Are there further ideas?

Here are my logs:
Code:

-*\
| =========                |                                                |
| \\      /  F ield        | foam-extend: Open Source CFD                    |
|  \\    /  O peration    | Version:    4.1                                |
|  \\  /    A nd          | Web:        http://www.foam-extend.org        |
|    \\/    M anipulation  | For copyright notice see file Copyright        |
\*---------------------------------------------------------------------------*/
Build  : 4.1-70b064d0f326
Exec  : solids4Foam
Date  : Sep 27 2021
Time  : 15:51:29
Host  : "philipp-MS-7A38"
PID    : 29337
CtrlDict : "/home/philipp/foam/philipp-4.1/run/OF/2021_09_27/crossFlow_Own/system/controlDict"
Case  : /home/philipp/foam/philipp-4.1/run/OF/2021_09_27/crossFlow_Own
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

/*---------------------------------------------------------------------------*\
|    For further information on the solids4Foam toolbox implementations,      |
|    please see the following publications:                                  |
|                                                                            |
|    P. Cardiff, A Karac, P. De Jaeger, H. Jasak, J. Nagy, A. Ivankovic,      |
|    Z. Tukovic: An open-source finite volume toolbox for solid mechanics and |
|    fluid-solid interaction simulations. arXiv:1808.10736v2, 2018, available |
|    at https://arxiv.org/abs/1808.10736.                                    |
|                                                                            |
|    Z. Tukovic, A. Karac, P. Cardiff, H. Jasak, A. Ivankovic: OpenFOAM      |
|    finite volume solver for fluid-solid interaction.  Transactions of      |
|    Famena, 42 (3), pp. 1-31, 2018, 10.21278/TOF.42301.                      |
\*---------------------------------------------------------------------------*/

Selecting physicsModel fluidSolidInteraction

Selecting fluidSolidInterface method Aitken

Selecting fluidModel icoFluid
Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: velocityLaplacian
Selecting motion diffusion: quadratic
Selecting motion diffusion: inverseDistance
g field not found in constant directory: initialising to zero
Selecting solidModel nonLinearGeometryUpdatedLagrangian
Selecting dynamicFvMesh staticFvMesh
Creating fixedDisplacement boundary condition
Creating solidTraction boundary condition
    limiter coefficient: 1
    under-relaxation method: fixed
Creating the mechanicalModel
Selecting mechanical law neoHookeanElastic
additionalMeshCorrection: false
Selecting interfaceToInterfaceMapping GGI
Courant Number mean: 2.74902e-06 max: 0.00510776 velocity magnitude: 30
deltaT = 1.2e-06
Time = 1.2e-06

Setting traction on solid interfaces
Interpolating face values using GGI
Create GGI zone-to-zone interpolator
interface-to-interface face error: 0.145588
calcMasterPointAddressing() const
Extended GGI, master point distance, max: 7.31739e-05, avg: 1.08881e-06, min: -1.68008e-05
interface-to-interface point error: 7.31739e-05
Number of uncovered master faces: 1
Number of uncovered slave faces: 3

Total force on fluid interface 0: (0 0 0)
Total force on solid interface 0: (0 0 0)

Evolving solid solver
Solving the updated Lagrangian form of the momentum equation for DD
setCellDisplacements: reading cellDisplacements
    Corr, res, relRes, matRes, iters
    Both residuals have converged
    2, 0, 0, 0, 0

Interpolating point values using GGI
Interpolating point values using GGI
FSI relative residual1 norm for interface 0: 0
FSI residual2 norm for interface 0: 0

Time = 1.2e-06, iteration: 1
Current fsi under-relaxation factor (fixed): 0.05
Maximal accumulated displacement of interface 0: 0
GAMG:  Solving for cellMotionUx, Initial residual = 0, Final residual = 0, No Iterations 1
GAMG:  Solving for cellMotionUy, Initial residual = 0, Final residual = 0, No Iterations 1
GAMG:  Solving for cellMotionUz, Initial residual = 0, Final residual = 0, No Iterations 1
GAMG:  Solving for cellMotionUx, Initial residual = 0, Final residual = 0, No Iterations 1
GAMG:  Solving for cellMotionUy, Initial residual = 0, Final residual = 0, No Iterations 1
GAMG:  Solving for cellMotionUz, Initial residual = 0, Final residual = 0, No Iterations 1
Evolving fluid model: icoFluid
Courant Number mean: 3.29882e-06 max: 0.00612931 velocity magnitude: 30

PISO: Operating solver in PISO mode

DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 4.40629e-08, No Iterations 1
DILUPBiCG:  Solving for Uy:  solution singularity
DILUPBiCG:  Solving for Uz:  solution singularity
GAMG:  Solving for p, Initial residual = 1, Final residual = 6.34219e-07, No Iterations 15
GAMG:  Solving for p, Initial residual = 0.131569, Final residual = 8.61138e-07, No Iterations 11
time step continuity errors : sum local = 1.53686e-07, global = 2.84692e-08, cumulative = 2.84692e-08
GAMG:  Solving for p, Initial residual = 0.0254475, Final residual = 8.75811e-07, No Iterations 10
GAMG:  Solving for p, Initial residual = 0.00591659, Final residual = 4.72096e-07, No Iterations 9
time step continuity errors : sum local = 8.81695e-08, global = 1.36805e-08, cumulative = 4.21497e-08
GAMG:  Solving for p, Initial residual = 0.00166295, Final residual = 6.54635e-07, No Iterations 7
GAMG:  Solving for p, Initial residual = 0.000494962, Final residual = 8.44851e-07, No Iterations 5
time step continuity errors : sum local = 1.57978e-07, global = 3.92148e-09, cumulative = 4.60711e-08
Setting traction on solid interfaces
Interpolating face values using GGI
Total force on fluid interface 0: (-3825.75 15123.4 21189.2)
Total force on solid interface 0: (3833.97 -15118.3 -21186.4)

Evolving solid solver
Solving the updated Lagrangian form of the momentum equation for DD
Gleitkomma-Ausnahme (Speicherabzug geschrieben)


anaspauzi June 4, 2022 03:51

Master point addressing is not correct!
 
Hi Daniel Khazaei, Ali Shayegh, and respected readers,
I think I'm having the same problem.

Quote:

Originally Posted by Daniel_Khazaei (Post 744156)
interpolatorUpdateFrequency defaults to 0, therefore commenting out that line is equivalent of setting it to 0.
Although it is written that "0 means the interpolator is updated every time-step", this piece of code in fluidSolidInterface.C which is responsible of updating interpolator is doing things differently! It doesn't update interpolator every time-step when interpolatorUpdateFrequency is set to 0: (take a look at the red line)

Code:

void Foam::fluidSolidInterface::updateInterpolatorAndGlobalPatches()
{
    if (!ggiInterpolatorPtr_)
    {
        ggiInterpolator();
    }
    else if (interpolatorUpdateFrequency_ != 0)
    {
        if (((runTime().timeIndex() - 1) % interpolatorUpdateFrequency_) == 0)
        {
            deleteDemandDrivenData(ggiInterpolatorPtr_);
            fluid().clearGlobalPatch();
            solid().clearGlobalPatch();
            fluid().makeGlobalPatch
            (
                fluidMesh().boundaryMesh()[fluidPatchIndex_].name()
            );
            solid().makeGlobalPatch
            (
                solidMesh().boundaryMesh()[solidPatchIndex_].name()
            );
            ggiInterpolator();
        }
    }
}

This means when the interpolatorUpdateFrequency is set to 0, the interpolator is created only once at the beginning of the simulation without further update during the simulation!

I've managed to restart without problem my 1st time, but on the second time, it came out with this error message:

Quote:

[8] --> FOAM FATAL ERROR:
[8] Master point addressing is not correct
[8]
[8] From function ExtendedGGIInterpolation::masterToSlavePointInterp olate(const Field<Type> pf)
My mesh is also slightly non-conformal, I've refined my solid mesh at high stressed regions.

How can I restart this simulation again?

Thank you

ANAS


All times are GMT -4. The time now is 10:20.