CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

How to run scalarTransport functionObject?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By frodooon
  • 1 Post By tomf

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   August 6, 2020, 10:05
Default How to run scalarTransport functionObject?
  #1
New Member
 
Join Date: May 2009
Posts: 12
Rep Power: 17
frodooon is on a distinguished road
Hello,


I have the solution field of a test case ran with simpleFoam (the windTurbine tutorial, to be precise), and I am running on OFv6. So, this is a steady-state case.

I now want to compute a scalarTransport based on the last iteration that I have saved, which in this case is iteration 400.

For this, I added the following lines to my controlDict:

Code:
functions
{
    BlackCarbon                                                         
    {   
        type            scalarTransport;
        libs            ("libsolverFunctionObjects.so");

        field           s;  
        schemesField    U;  
        D               1e-09;
    }   
}
and I added a "s" file in my 400/ folder, which is the following:


Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |   
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "400";
    object      s;  
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

sInlet          1;  

dimensions      [0 0 0 0 0 0 0];  // s can represent any scalar
                                  // with any dimensional units
internalField   uniform 0;

boundaryField
{
    inlet
    {   
        type            fixedValue;
        value           uniform $sInlet;
    }   
    outlet
    {   
        type            zeroGradient;
    }   
    ground
    {   
        type            fixedValue;
        value           uniform 0;
    }   
    frontAndBack
    {   
        type            symmetry; 
    }   
    buildings
    {   
        type            fixedValue;
        value           uniform 0;
    }   

    #includeEtc "caseDicts/setConstraintTypes"
}

// ************************************************************************* //
And finally, I execute by typing


Quote:
simpleFoam -postProcess -latestTime
I see then the log, which shows that the code executes without error but:
  1. It only iterates once, and
  2. It doesn't write anything! (it does not replace the 400/s file, nor it creates new time directories..)
The log is the following:


Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 6
Exec   : simpleFoam -postProcess -latestTime
Date   : Aug 06 2020
Time   : 15:56:27
Host   : "node0853"
PID    : 17590
I/O    : uncollated
Case   : /home/cenaero/acandael/scalarTransportTest
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 400


SIMPLE: Convergence criteria found
        p: tolerance 0.0001
        U: tolerance 0.0001
        "(k|omega|epsilon|s)": tolerance 0.0001

Time = 400
Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
RAS
{
    RASModel        kEpsilon;
    turbulence      on;
    printCoeffs     on;
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              0;
    sigmak          1;
    sigmaEps        1.3;
}

No MRF models present

No finite volume options present
scalarTransport write:
smoothSolver:  Solving for s, Initial residual = 1, Final residual = 0.0480613, No Iterations 2


End
My question is therefore: why doesn't it compute further, and why doesn't it write anything?
In this case, in my controlDict I specified
Code:
application     simpleFoam;
startFrom       latestTime;
startTime       400;
stopAt          endTime;
endTime         500;
deltaT          1;  
writeControl    timeStep;
writeInterval   50;

...is it the way it is supposed to be? I am as well a bit confuse on the fact that scalarTransport solves an unsteady equation, but is nevertheless accessible from a simpleFoam (steady) command..


Anyway, any help would be greatly appreciated!!


Thanks a lot,
Arnaud.
allanZHONG likes this.
frodooon is offline   Reply With Quote

 


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
[OpenFOAM.org] paraFoam Fatal Error upon run Gallienus OpenFOAM Installation 2 April 14, 2020 19:23
Cannot run phoenix on linux opensuse 13.1 kde mabal Phoenics 0 June 15, 2014 06:16
[mesh manipulation] Cannot get refineMesh to run in parallel smschnob OpenFOAM Meshing & Mesh Conversion 2 June 3, 2014 11:20
functionObject to control run time marc.immer OpenFOAM Programming & Development 0 March 25, 2014 10:43
First Parallel Run - need some help Gian Maria OpenFOAM 3 June 17, 2011 12:08


All times are GMT -4. The time now is 13:06.