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

Forces not calculated when including a library in controlDict

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 12, 2011, 06:49
Default Forces not calculated when including a library in controlDict
  #1
Member
 
Vigfús Arnar Jósefsson
Join Date: Nov 2009
Location: Reykjavik
Posts: 30
Rep Power: 7
fusij is on a distinguished road
Hello,

The forces are not calculated when I include my own library in the controlDict. It seems like that nothing is run in the controlDict after I include the library. Here is my controlDict:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.3                                   |
|   \\  /    A nd           | Web:      http://www.openfoam.org               |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

FoamFile
{
    version         2.0;
    format          ascii;
    class           dictionary;
    object          controlDict;
}

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

applicationClass turbDyMFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         1.0000;

deltaT          0.005;

writeControl    adjustableRunTime;

writeInterval   0.02;

cycleWrite      0;

writeFormat     ascii;

writePrecision  7;

writeCompression uncompressed;

timeFormat      general;

timePrecision   7;

runTimeModifiable yes;

adjustTimeStep yes;

maxCo          0.5;

maxDeltaT      1.0;

libs ("libmydynamicFvMesh.so")

functions
(
        forces
        {
                type forces;
                functionObjectLibs ("libforces.so");
                outputControl outputTime;

                // Patches to sample
                patches (blade);
        // Name of fields
                pName p;
                Uname U;
        // Dump to file
                log true;
        // Density
                rhoName rhoInf;
                rhoInf 1000; //Reference density for fluid
        // Centre of rotation
                CofR (0 0 0.3);
}
);
Does someone know the way around this problem and can tell me what to do? I am using OF-1.5-dev.

Thank you.
fusij is offline   Reply With Quote

Old   May 12, 2011, 11:56
Default
  #2
Member
 
Vigfús Arnar Jósefsson
Join Date: Nov 2009
Location: Reykjavik
Posts: 30
Rep Power: 7
fusij is on a distinguished road
This is rather urgent and I would be very grateful if someone had any ideas or comments.

I need the forces calculations since I want to calculate a moment on a patch.
fusij is offline   Reply With Quote

Old   May 13, 2011, 07:25
Default
  #3
Senior Member
 
Andrea Pasquali
Join Date: Sep 2009
Location: Germany
Posts: 142
Rep Power: 7
andrea.pasquali is on a distinguished road
Try this, it works for me:
Quote:
forcesBlade_2
{
type forces;
functionObjectLibs ("libforces.so");
verbose true;
log true;
patches ( blade_2_NEW );
rhoName rhoInf;
rhoInf 1.225;
CofR (0 0 0);
outputControl timeStep;
outputInterval 1;
}
It calculates forces for each time step

Andrea
__________________
Andrea Pasquali
andrea.pasquali is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
controlDict 'forces' function: multiple output files? lordvon OpenFOAM 0 January 10, 2011 17:22
Reading forces from previous time step within solver SD@TUB OpenFOAM Programming & Development 0 March 14, 2010 07:58
Forces calulated through pressure LVDH OpenFOAM Post-Processing 2 February 26, 2010 04:15
OpenFOAM141dev linking error on IBM AIX 52 matthias OpenFOAM Installation 24 April 28, 2008 15:49
Valve Forces in CFdesign Mike Clapp Main CFD Forum 3 March 8, 2001 15:09


All times are GMT -4. The time now is 02:31.