Find answers, ask questions, and connect with our <br>community around the world.

Home Forums OpenFOAM Forum setFields – damBreak

  • setFields – damBreak

    Posted by Harshavardhan on January 23, 2023 at 1:47 am

    When i increase the mesh size and try to setFields i get the following error.



    reate time

    Create mesh for time = 0

    Reading setFieldsDict

    Setting field default values
    Setting internal values of volScalarField alpha.water

    –> FOAM FATAL IO ERROR: (openfoam-2206)
    size 2268 is not equal to the expected length 2982

    file: 0/alpha.water at line 19 to 2317.

    From Foam::Field<Type>::Field(const Foam::word&, const Foam::dictionary&, Foam::label) [with Type = double; Foam::label = int]
    in file /home/hk3956/Desktop/openfoam/OpenFOAM-v2206/src/OpenFOAM/lnInclude/Field.C at line 218.

    FOAM exiting

    Barış Bicer replied 1 year, 2 months ago 2 Members · 4 Replies
  • 4 Replies
  • Harshavardhan

    January 23, 2023 at 2:06 am

    What I can understand is that the alpha.water in the /0 folder is not getting re-written if a new mesh is created and creating the above the error. Is there a way to fix this ?

  • Barış Bicer

    January 23, 2023 at 9:10 pm

    yeah of course. Thats why there is file in this case. You have to copy the 0 file all the time from when you changed the mesh.

    For your info

  • Harshavardhan

    January 27, 2023 at 6:51 pm

    Is this problem specific or applicable to all problems ?

  • Barış Bicer

    January 28, 2023 at 8:24 am

    this is not problem. When you change mesh just you cant overwrite the fields on the same setFields. Thats why you have to recopy when 0 folder when you change the mesh.

    Fro your information

Log in to reply.

error: Content is protected !!