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] SOLVED: Paraview can't read solids files (duplicate entries with keyword value) (https://www.cfd-online.com/Forums/openfoam-cc-toolkits-fluid-structure-interaction/221892-solved-paraview-cant-read-solids-files-duplicate-entries-keyword-value.html)

tschenkel November 4, 2019 03:26

SOLVED: Paraview can't read solids files (duplicate entries with keyword value)
 
Hi,


I am in the process of migrating my FSI simulations from the old FSI toolbox to the new solids4foams.


I am currently running

Using: foam-extend-4.1 (see www.foam-extend.org)
Build: 4.1-5832cfe256a5



When I try to run the 3dTube/linearElastic3dTube tutorial case the case runs fine, however, paraview can't read the solid region:

...Error reading line 11260 of /home/acests3/foam/acests3-4.1/run/3dTube/linearElastic3dTube/0.0002/solid/D: Found duplicated entries with keyword value


...Error reading line 8052 of /home/acests3/foam/acests3-4.1/run/3dTube/linearElastic3dTube/0.0002/solid/D_0: Found duplicated entries with keyword value


...Error reading line 44 of /home/acests3/foam/acests3-4.1/run/3dTube/linearElastic3dTube/0.0002/solid/D_0_0: Found duplicated entries with keyword value




Paraview is V5.6.0


What am I missing?

Best
Torsten

tschenkel November 5, 2019 14:20

Update:

There seems to be a problem/bug in foam-extend-4.1 (MPI error in the pressure GAMG solver), which was a showstopper for me, so I reverted back to fe40, and recompiled solids4foam on fe40.

This problem does not show up then. So it seems to be caused by a change from fe40 to fe41.

Best
T

Daniel_Khazaei November 7, 2019 18:29

Quote:

Originally Posted by tschenkel (Post 748970)
Update:

There seems to be a problem/bug in foam-extend-4.1 (MPI error in the pressure GAMG solver), which was a showstopper for me, so I reverted back to fe40, and recompiled solids4foam on fe40.

This problem does not show up then. So it seems to be caused by a change from fe40 to fe41.

Best
T

facing the exact same problem on fe41:confused:

bigphil November 8, 2019 06:57

Quote:

Originally Posted by tschenkel (Post 748781)
Hi,


I am in the process of migrating my FSI simulations from the old FSI toolbox to the new solids4foams.


I am currently running

Using: foam-extend-4.1 (see www.foam-extend.org)
Build: 4.1-5832cfe256a5



When I try to run the 3dTube/linearElastic3dTube tutorial case the case runs fine, however, paraview can't read the solid region:

...Error reading line 11260 of /home/acests3/foam/acests3-4.1/run/3dTube/linearElastic3dTube/0.0002/solid/D: Found duplicated entries with keyword value


...Error reading line 8052 of /home/acests3/foam/acests3-4.1/run/3dTube/linearElastic3dTube/0.0002/solid/D_0: Found duplicated entries with keyword value


...Error reading line 44 of /home/acests3/foam/acests3-4.1/run/3dTube/linearElastic3dTube/0.0002/solid/D_0_0: Found duplicated entries with keyword value




Paraview is V5.6.0


What am I missing?

Best
Torsten

Hi Torsten,

I have checked this on my system (case run on Ubuntu 16.04 LTS with foam-extend-4.1, build 4.1-e01e16c94382, and the latest master branch of solids4Foam, with ParaView 5.6.0 on macOS) but am not getting an error.

One solution is to use foam-extend-4.0.

To try to determine where the problem is, I suggest you move all of the solid fields out of the time sub-directory and see if you can now read the solid region in ParaView. If this works, then move back in the fields one-by-one until you find the one that ParaView complains about. If you find the problem, hopefully, it may become clear how to fix it.

Philip

tschenkel November 8, 2019 12:54

Hi Philip

I have not tested again with fe41 after upgrading to the master branch of solids4foam. Will try to do that next week.


The fields that are causing the problems are the D fields (D, D_0, D_0_0). If I disable them (unchecking them in the dialog in paraview, no need to move the files), the case reads fine and I can use the pointD field to warp the mesh to match the mesh motion of the fluid region.

I'll have to double check the MPI bug in fe41 as well, and open another thread on that (does your fe41 work in parallel with GAMG for p?).

Which compiler is recommended for fe41 and solids4foam?

I compiled both with gcc 4.8.5 on CentOS 7.6 for foam-extend 4.0, but fe41 doesn't seem to like gcc 4.8.5, so I used the gcc7 toolchain for that.

tschenkel November 21, 2019 07:18

This has been resolved.

After a bugfix update in foam-extend 4.1 I


- pulled the current sources for both foam-extend-4.1 and solids4Foam-release
- recompiled both with the gcc7 toolchain on CentOS (Ubuntu 18.04 still compiling)


and the testcase is working fine now.

How do I change the thread title to include "SOLVED"?

bigphil November 21, 2019 07:27

Great.

Done.

Michael@UW March 20, 2020 18:43

Quote:

Originally Posted by tschenkel (Post 750371)
This has been resolved.

After a bugfix update in foam-extend 4.1 I


- pulled the current sources for both foam-extend-4.1 and solids4Foam-release
- recompiled both with the gcc7 toolchain on CentOS (Ubuntu 18.04 still compiling)


and the testcase is working fine now.

How do I change the thread title to include "SOLVED"?

I just recompiled foam-extedn 4.1 and solids4Foam on Ubuntu 18.04, but the issue is still the same. D, D_0, D_0_0, DD, DD_0 can not be loaded into Paraview due to duplicated entries.
This bug was fixed in OpenFOAM foundation version stated at https://bugs.openfoam.org/view.php?id=2737.

I wonder if it is fixed in foam-extend.

Michael@UW March 20, 2020 19:03

It seems the values on "solidTraction boundary" are written twice.
Here is the output of linearElastic3dTube/0.0001/solid/D:

Code:


/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | foam-extend: Open Source CFD                    |
|  \\    /  O peration    | Version:    4.1                                |
|  \\  /    A nd          | Web:        http://www.foam-extend.org        |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    location    "0.0001";
    object      D;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 0 0 0 0 0];

internalField  nonuniform List<vector>
6400
(

;

boundaryField
{
    inlet
    {
        type            fixedDisplacement;
        value          uniform (0 0 0);
    }
    outlet
    {
        type            fixedDisplacement;
        value          uniform (0 0 0);
    }
    inner-wall
    {
        type            solidTraction;
        gradient        nonuniform List<vector>
1600
(
First time
)
;
        pressure        uniform 0;
        secondOrder    false;
        limitCoeff      1;
        relaxationFactor 1;
        value          nonuniform List<vector>
1600
(
Second time!
)
;
    }
    symmetry-x
    {
        type            solidSymmetry;
        patchType      symmetryPlane;
        secondOrder    false;
        value          nonuniform List<vector>
320
(

)
;
    }
    symmetry-y
    {
        type            solidSymmetry;
        patchType      symmetryPlane;
        secondOrder    false;
        value          nonuniform List<vector>
320
(

)
;
    }
}


// ************************************************************************* //


Michael@UW March 20, 2020 19:14

fvPatchVectorField::write(os) does the work.

Code:


void solidTractionFvPatchVectorField::write(Ostream& os) const
{
    //fixedGradientFvPatchVectorField::write(os);
    fvPatchVectorField::write(os);

    if (tractionSeries_.size())
    {
        os.writeKeyword("tractionSeries") << nl;
        os << token::BEGIN_BLOCK << nl;
        tractionSeries_.write(os);
        os << token::END_BLOCK << nl;
    }
    else
    {
#ifdef OPENFOAMFOUNDATION
        writeEntry(os, "traction", traction_);
#else
        traction_.writeEntry("traction", os);
#endif
    }

    if (pressureSeries_.size())
    {
        os.writeKeyword("pressureSeries") << nl;
        os << token::BEGIN_BLOCK << nl;
        pressureSeries_.write(os);
        os << token::END_BLOCK << nl;
    }
    else
    {
#ifdef OPENFOAMFOUNDATION
        writeEntry(os, "pressure", pressure_);
#else
        pressure_.writeEntry("pressure", os);
#endif
    }
    os.writeKeyword("secondOrder")
        << secondOrder_ << token::END_STATEMENT << nl;
    os.writeKeyword("limitCoeff")
        << limitCoeff_ << token::END_STATEMENT << nl;
    os.writeKeyword("relaxationFactor")
        << relaxFac_ << token::END_STATEMENT << nl;

#ifdef OPENFOAMFOUNDATION
    writeEntry(os, "value", *this);
#else
    writeEntry("value", os);
#endif
}


Michael@UW March 20, 2020 19:25

It worked after I recompiled the solids4Foam!

bigphil March 23, 2020 04:48

Thanks Michael@UW,

I will push this change to the development branch.
I guess this is a result of something changing in foam-extend-4.1.

Philip


All times are GMT -4. The time now is 23:24.