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

Using fieldAverage function in parallel

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Cal

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2020, 22:02
Question Using fieldAverage function in parallel
  #1
Cal
New Member
 
Calvin
Join Date: Nov 2019
Posts: 13
Rep Power: 3
Cal is on a distinguished road
Hi all,

I am currently running a case analyzing spray in a tube using the sprayFoam solver. I am running it remotely on multiple processes via the mpirun command. The code I am using to run the solver is:


mpirun -np 16 sprayFoam -parallel > log 2>&1


This has worked perfectly until I wanted to use the fieldaverage function. I receive an error message stating that the fieldAverage function was unable to locate a file path. error message:

Code:
[1] --> FOAM FATAL ERROR:
[1] cannot find file "/scratch/RDS-FSC-gbr-RW/Accuracy_Tests/AT_003/Master/processor1/0/s"
[1]
[1] [7] [10]     From function virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOpera$
[1]     in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 505.
[1]
FOAM parallel run exiting
My controlDict file is:

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

application     sprayFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         3.5e-3;//0.32;

deltaT          1e-8;

writeControl    adjustableRunTime;

writeInterval   1e-5;

purgeWrite      20;

writeFormat     ascii;

writePrecision  6;

writeCompression uncompressed;

timeFormat      general;

timePrecision   6;

adjustTimeStep  yes;

maxCo           0.038;

runTimeModifiable yes;

functions
{

    #includeFunc  residuals
 
    probes
    {
        type            probes;
        libs            ("libsampling.so");
        writeControl    timeStep;
        writeInterval   1;

        fields
        (
            p U
        );

        probeLocations
        (
            (0.05 0.115 0)
            (0.05 0.06 0)
            (0.05 0.01 0)
        );

    }

    fieldAverage1
    {
        type            fieldAverage;
        libs            ("libfieldFunctionObjects.so");
        writeControl    writeTime;

        fields
        (
            U
            {
                mean        on;
                prime2Mean  on;
                base        time;
            }

            p
            {
                mean        on;
                prime2Mean  on;
                base        time;
            }
        );
    }

    #includeFunc scalarTransport
}



// ************************************************************************* //
I don't want to post process the fieldaverage as the solution is very large and I don't want to have to collect the entire run's worth of data. What do I need to do to be able to run this case in parallel?

Thanks!! and let me know if you need anymore info

Last edited by Cal; March 11, 2020 at 01:15.
Cal is offline   Reply With Quote

Old   March 11, 2020, 04:25
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 173
Rep Power: 12
Yann is on a distinguished road
Hello Calvin,

Are you sure the error is related to the fieldAverage function?

Your error message complains about a missing file named "s" and this is usually the default name of the variable used in scalar transport, which is the function you are using right after fieldAverage in your controlDict.

Was the scalarTransport function working before you added the fieldAverage function?

Yann
Yann is offline   Reply With Quote

Old   March 11, 2020, 04:56
Default
  #3
Cal
New Member
 
Calvin
Join Date: Nov 2019
Posts: 13
Rep Power: 3
Cal is on a distinguished road
omg Yann you're totally right! I have over looked that for sooooo long


It is resolved Thankyou!
Yann likes this.
Cal is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 12 July 11, 2019 18:33
The problem when i use parallel computation for mesh deforming. Hiroaki Sumikawa OpenFOAM Running, Solving & CFD 0 November 20, 2018 03:58
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 13:21
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 05:37
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00


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