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

[swak4Foam] patchExpression and swakExpression do not respond in OpenFOAM 4

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 26, 2016, 08:01
Default patchExpression and swakExpression do not respond in OpenFOAM 4
  #1
Member
 
a
Join Date: Oct 2014
Posts: 49
Rep Power: 11
cfd@kgp is on a distinguished road
Dear openFoam experts,

the controlDict which was working for openfoam 3.0 fails to perform for the new version.

do I have to change any style of writing functions in version 4.0?

the error which I get is given below,
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 4.1-1e03d68d4f4e
Exec   : buoyantPimpleFoam
Date   : Nov 26 2016
Time   : 18:33:41
Host   : "CFD-desktop"
PID    : 21813
Case   : /home/ojas/OPENFOAM_4.0_18_november/LUST/beta-2
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Reading thermophysical properties

Selecting thermodynamics package 
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectFluid;
    specie          specie;
    energy          sensibleInternalEnergy;
}

Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type laminar

Reading g

Reading hRef
Calculating field g.h

Reading field p_rgh

Creating field dpdt

Creating field kinetic energy K

No MRF models present

Radiation model not active: radiationProperties not found
Selecting radiationModel none
Creating finite volume options from "constant/fvOptions"

Selecting finite volume options model type solidificationMeltingSource
    Source: sMS1
    - selecting cells using cellZone solid
    - selected 21504 cell(s) with volume 5.64515e-06
Courant Number mean: 0 max: 0

Starting time loop



--> FOAM FATAL IO ERROR: 
'functions' entry is not a dictionary

file: /home/ojas/OPENFOAM_4.0_18_november/LUST/beta-2/system/controlDict from line 18 to line 85.

    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 582.

FOAM exiting
and the controlDict is as follows,


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

libs (
      "libOpenFOAM.so"
      "libsimpleSwakFunctionObjects.so"
      "libswakFunctionObjects.so"
      "libgroovyBC.so"
     );
application     buoyantPimpleFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         3000.0;

deltaT          0.005;

writeControl    adjustableRunTime;

writeInterval   60;

purgeWrite      0;

writeFormat     binary;

writePrecision  8;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

functions
(

    WallHT
    {

        type patchExpression;
        patches ( "leftWall" );
    outputControlMode timeStep;
    outputInterval 1;
    variables ("k1=32;" );


        expression "k1*(snGrad(T))*area()";
        accumulations (sum);
        verbose true;
        //        debugCommonDriver 1;
    }
   uysqr
    {
        type swakExpression;
        valueType cellZone;
        zoneName solid; // or whatever is your zoneName
        accumulations (
            min 
        );
       variables ("fl=(mag(381.5*(T-302.78))/80160);" );
        expression "sum((U.y*U.y)*vol()*fl)/sum(vol()*fl)";
        verbose true;
       //outputControlMode timestep
    }
);



//TRY ALL values average for one case they should match//
// ************************************************************************* //
Please help

Last edited by wyldckat; November 27, 2016 at 20:39. Reason: Changed [QUOTE][/QUOTE] to [CODE][/CODE]
cfd@kgp is offline   Reply With Quote

Old   November 27, 2016, 20:46
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer:
  • I've moved your post from http://www.cfd-online.com/Forums/ope...m-4-0-a-3.html to a new thread, because this is a using problem, not an installation problem.
  • Something happened between your original "controlDict" file on OpenFOAM 3.* and the current one for 4.*, because the functions block is defined incorrectly... you have:
    Code:
    functions
    (
        //...
    );
    when the correct format is:
    Code:
    functions
    {
        //...
    }
    When in doubt, check the User Guide and the OpenFOAM "tutorials" for examples.
__________________
wyldckat is offline   Reply With Quote

Old   November 29, 2016, 02:04
Default
  #3
Member
 
a
Join Date: Oct 2014
Posts: 49
Rep Power: 11
cfd@kgp is on a distinguished road
Many thanks wyldckat for identification of my mistake and the useful general tip!!!
cfd@kgp 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



All times are GMT -4. The time now is 11:58.