CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Solver Fails to Locate Previous Timestep Solutions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 25, 2019, 14:59
Default Solver Fails to Locate Previous Timestep Solutions
  #1
New Member
 
Join Date: Jun 2019
Location: United States
Posts: 15
Rep Power: 6
ryanc6 is on a distinguished road
Hello. I am attempting to model a projectile at high speeds (approximately mach 2-3) and in a compressible, atmospheric environment. My solver of choice is sonicFoam. It is required for future studies that I be able to import .stl or .obj projectiles into the simulation, however for simplicity I currently model a cylinder with a semi-spherical nose. I use blockMesh to generate a background mesh of 3feet in the motion of the projectile (x1 direction) and 2feet by 2feet in the x2 & x3 directions. I then use the surfaceFeatureExtract and snappyHexMesh utilities to mesh around the projectile and attempt the solution via sonicFoam. For more simplicity, I have the simulation set up to run 1sec at 0.25sec time steps. Each time I recieve an error message which reads:


Code:
  FOAM FATAL ERROR:
cannot find file "/p/work/ryanc6/run/SabotDesign1/0.5/p"

    From function virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOperation::readStream(Foam::regIOobject&, const Foam::fileName&, const Foam::word&, bool) const
    in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 532.

FOAM exiting
I have been unsuccessful in finding any information about how to solve this error. I do notice that no information is being written to the new directories 0.25 and 0.5 besides polymesh information. Any help will be greatly appreciated. Attached are all of my files. Thanks.

Respectfully,
ryanc6
Attached Files
File Type: zip SabotDesign1.zip (33.6 KB, 1 views)
ryanc6 is offline   Reply With Quote

Old   June 26, 2019, 03:21
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26
Yann will become famous soon enough
Hello ryanc6

Have you run snappyHexMesh with the '-overwrite' option?
If not, the default behavior of snappyHexMesh is to create new timeStep folders containing a polyMesh for the different meshings steps (castellated, snap, layers).

This might explain why you get timestep folders with only polyMesh inside.

Do you run you case in parallel?

Yann
Yann is offline   Reply With Quote

Old   June 26, 2019, 11:01
Default
  #3
New Member
 
Join Date: Jun 2019
Location: United States
Posts: 15
Rep Power: 6
ryanc6 is on a distinguished road
Yann,

Thanks for the help! I am running snappyHexMesh with the overwrite option now. I did not expect a 1sec simulation with 5 timesteps to take this long; however, it has been running for just under an hour now. I will update when it finishes.

This simulation is not the main study of my project, but rather the starting point. It runs in serial for now. With the required future complexity it will have to be run parallel at some point. I have been stuck on this part of the problem for a few days now, and my strategy for getting it solved is to reduce complexity as much as possible until a working solution is found. Then slowly increase complexity until the desired model and solution is achieved.

ryanc6
ryanc6 is offline   Reply With Quote

Old   June 26, 2019, 13:59
Default Attempted Parallel Run: Failed
  #4
New Member
 
Join Date: Jun 2019
Location: United States
Posts: 15
Rep Power: 6
ryanc6 is on a distinguished road
This system could not be completed within a reasonable time. Today I added a decomposeParDict file and tried again. I also fixed a few other bugs in the fvSchemes and fvSolutions pages. Now I receive this error after 15 minutes of processing:

Code:
--> FOAM FATAL IO ERROR: --> FOAM FATAL IO ERROR:

Expected a '(' or a '{' while reading List, found on line 23: label 7Expected a '(' or a '{' while reading List, found on line 23: label 7--> FOAM FATAL IO ERROR:

file: /p/work/ryanc6/run/SabotDesign1par/system/decomposeParDict at line

file: Expected a '(' or a '{' while reading List, found on line 23: label 7/p/work/ryanc6/run/SabotDesign1par/system/decomposeParDict at line 23

file: /p/work/ryanc6/run/SabotDesign1par/system/decomposeParDict at line 23.

    From function char Foam::Istream::readBeginList(const char*)
    in file db/IOstreams/IOstreams/Istream.C.
 at line 134.

FOAM exiting
The funny thing about this error, is there are () on line 23. Here is my decomoseParDict file:

Code:
  1 /*--------------------------------*- C++ -*----------------------------------*\
  2 | =========                 |                                                 |
  3 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
  4 |  \\    /   O peration     | Version:  v1812                                 |
  5 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
  6 |    \\/     M anipulation  |                                                 |
  7 \*---------------------------------------------------------------------------*/
  8 FoamFile
  9 {
 10     version     2.0;
 11     format      ascii;
 12     class       dictionary;
 13     object      decomposeParDict;
 14 }
 15 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 16
 17 numberOfSubdomains 44;
 18
 19 method          simple;
 20
 21 coeffs
 22 {
 23     2           ((8 7 7));  //also tried (8 7 7) and (2     (8 7 7) );
 24     delta       0.001;
 25 }
 26
 27 distributed     no;
 28
 29 roots           ( );
 30
 31
 32 // ************************************************************************* //
Obviously there is already a set of () on the lines it says are in error. I had another error just like this in my original snappyHexMeshDict file subdirectory refinementSurfaces. The only way I fixed that issue was to leave the refinementSurfaces section completely blank. If anyone knows how to fix this issue as well, I would greatly appreciate it. Thanks.

ryanc6
ryanc6 is offline   Reply With Quote

Old   June 27, 2019, 03:40
Default
  #5
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26
Yann will become famous soon enough
Hello ryanc6,

I don't know what is the size of your mesh but the best way to do it would be to run blockMesh then decompose the case so you can mesh in parallel. It will be more time efficient than having to decompose the final mesh.

About your decomposeParDict there are actually a syntax error and an error with the coefficients you have set. If your want to decompose your case on 44 cpus, it should be written for instance like this:

Code:
coeffs
{
    n           (11 2 2); 
    delta       0.001;
}
Dictionaries in OpenFoam always works the same way: name of the parameter (n) and corresponding value.
Have a look at the documentation : https://cfd.direct/openfoam/user-gui...ions-parallel/

About your problem with the refinementSurfaces in snappyHexMesh, there is probably an issue with the syntax, or a missing semicolon or bracket somewhere. (not necessarily at the line thrown in the error message, depending on what is missing. So you should also check if everything is fine before the refinementSurfaces section)

Yann
Yann is offline   Reply With Quote

Old   June 27, 2019, 19:39
Default Attempted Parallel Run: Failed
  #6
New Member
 
Join Date: Jun 2019
Location: United States
Posts: 15
Rep Power: 6
ryanc6 is on a distinguished road
Thanks for the help Yann. I am out of that problem and onto the next sticky situation. Now I believe there is an error during the deconstruct portion. I get this error:

Code:
 -->FOAM FATAL IO ERROR:
 Cannot find patchField entry for procBoundary4to12

 file: /p/work/ryanc6/run/SDc/processor4/0/p.boundaryField

     From function [13] void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::readField(const Foam::DimensionedField<TypeR, GeoMesh>&, const Foam::dictionary&) [with Type = double; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh][20]
I receive many of the same error messages but for different processor numbers and different procBoundary numbers. Do you know what is wrong?

Here is my decompParDict file:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1812                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

numberOfSubdomains 36;

method          simple;

coeffs
{
    n           (4 3 3);
    delta       0.001;
}

distributed     no;

roots           ( );


// ************************************************************************* //
Here is processor4's 0/p file

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1812 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];


internalField uniform 110000;

boundaryField
{
sides
{
type zeroGradient;
}
inlet
{
type zeroGradient;
}
procBoundary4to0
{
type processor;
value uniform 110000;
}
procBoundary4to5
{
type processor;
value uniform 110000;
}
procBoundary4to8
{
type processor;
value uniform 110000;
}
procBoundary4to16
{
type processor;
value uniform 110000;
}
}


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

Thanks for all the help!

ryanc6
ryanc6 is offline   Reply With Quote

Old   June 28, 2019, 07:50
Default
  #7
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26
Yann will become famous soon enough
Hello ryanc6,

Your error is related to missing BCs in your variable files in the processor[0-N]/0 directories.

the procBoundary* patches are created when you decompose your case and it corresponds to the interface patches between processors.

It should be created in both processorN/constant/polyMesh/boundary and processorN/0/[U p ...] files, unless you don't have the 0 file already set up when you execute decomposePar.

What are the steps leading to this error? what commands do you run? After decomposing, do you have the 0 repertory decomposed in every processor directory?

Yann
Yann is offline   Reply With Quote

Old   July 1, 2019, 12:23
Default Parallel Execution: Failed
  #8
New Member
 
Join Date: Jun 2019
Location: United States
Posts: 15
Rep Power: 6
ryanc6 is on a distinguished road
Yann,

Yes it seems the issue is in the decomposing of the files. Not all of my original BC's in the initial 0 folder are copied over into each processor#/0/* folders. An example of this is shown in the pressure folder. Here is my 0/p file:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1812                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 100000;

boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform 100000;
    }

    outlet
    {
        type            waveTransmissive;
        field           p;
        psi             thermo:psi;
        gamma           1.3;
        fieldInf        100000;
        lInf            1;
        value           uniform 100000;
    }

    projectile
    {
        type            zeroGradient;
    }

    sides
    {
        type            zeroGradient;
    }
    #includeEtc "caseDicts/setConstraintTypes"

}

// ************************************************************************* //
Here is the corresponding p file from processor 19:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1812                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];


internalField   uniform 100000;

boundaryField
{
    sides
    {
        type            zeroGradient;
    }
    inlet
    {
        type            fixedValue;
        value           nonuniform 0();
    }
    outlet
    {
        type            waveTransmissive;
        gamma           1.3;
        fieldInf        100000;
        lInf            1;
        value           uniform 100000;
    }
    procBoundary19to7
    {
        type            processor;
        value           uniform 100000;
    }
    procBoundary19to15
    {
        type            processor;
        value           uniform 100000;
    }
    procBoundary19to18
    {
        type            processor;
        value           uniform 100000;
    }
    procBoundary19to23
    {
        type            processor;
        value           uniform 100000;
    }
    procBoundary19to31
    {
        type            processor;
        value           uniform 100000;
    }
}


// ************************************************************************* //
Notice the patchfield "projectile" was not copied over into the processor19/0/p file for some reason.

Here is a copy of the error readout:

Code:
--> FOAM FATAL IO ERROR:
Cannot find patchField entry for projectile

file: /p/work/ryanc6/run/SDn/processor19/0/p.boundaryField

     From function --> FOAM FATAL IO ERROR: void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::readField(const Foam::DimensionedField<TypeR, GeoMesh>&, const Foam::dictionary&) [with Type = double; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh]

 Cannot find patchField entry for projectile    in file
/app/unsupported/openfoam/1812/OpenFOAM-v1812/src/OpenFOAM/lnInclude/GeometricBoundaryField.C[17]  at line
 170file: ./p/work/ryanc6/run/SDn/processor17/0/p.boundaryField


FOAM parallel run exiting

To Answer your questions:
Here is the part of my run script which executed the commands in order:

Code:
aprun -n 1 blockMesh |tee blockmesh.out
aprun -n 1 surfaceFeatureExtract |tee sfe.out
aprun -n 1 decomposePar -force |tee decompose.out
aprun -n 36 snappyHexMesh -overwrite -parallel |tee shm.out
aprun -n 36 sonicFoam -parallel |tee sonicFoam.out
aprun -n 1 reconstructParMesh -constant -fullMatch |tee rrm.out
aprun -n 1 reconstructPar |tee reconstruct.out
aprun -n 1 foamToVTK | tee foamToVTK.out
All of the generated processor#/ directories contain a 0 and constant directory. The 0 directory is populated with all the required variable files, but not necessarily all of the BC's required for each variable. The constant directory has the polyMesh directory within it with what seems to be all of the required files: boundary, cellLevel, cellZones, faceZones, faces, level0Edge neighbour, owner, pointLevel, pointZone, points, sets, surfaceIndex.

Thanks for all the help.

ryanc6
ryanc6 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 15:45
Solver fails with compressible flow Eric CFX 4 February 4, 2006 08:28
compressible two phase flow in CFX4.4 youngan CFX 0 July 1, 2003 23:32
CFX 5.5 Roued CFX 1 October 2, 2001 16:49
Setting a B.C using UserFortran in 4.3 tokai CFX 10 July 17, 2001 16:25


All times are GMT -4. The time now is 18:01.