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

Force output control help

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 22, 2020, 06:26
Default Force output control help
  #1
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 256
Rep Power: 14
quarkz is on a distinguished road
Hi,

I'm using the force file to output the forces on the airfoils:

Code:
forces_total
{
    type            forces;
    libs            (forces);

    writeControl    time;
    writeInterval   0.001;
    log             false;

    patches
	(
		"(front|back)"
	);
    rho             rhoInf;
    rhoInf          1.2;
    CofR            (0.25 0 0);
}
However, I'm not able to control how frequently the file is written. I want it to be written e.g. every 0.001 simulated sec.

But it seems that it's written out every time step.

Is this possible? If not, what's the purpose of writeControl?

Hope to clarify this
quarkz is offline   Reply With Quote

Old   July 22, 2020, 07:47
Default
  #2
New Member
 
sreekanth
Join Date: Dec 2019
Posts: 13
Rep Power: 2
neko2650 is on a distinguished road
Hi,
You can change the frequency of writing the output in the beginning of controlDict file "writeInterval" line and later you can call the "writeIterval" option in your functions



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

application     interFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         10;

deltaT          0.01;

writeControl    adjustableRunTime;

writeInterval   0.001;

purgeWrite      0;

writeFormat     binary;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  yes;

maxCo           0.5;
maxAlphaCo      0.5;
maxDeltaT       1;

functions
{
    forces
    {
        type                forces;
        libs                ("libforces.so");
        writeControl        timeStep;
        writeInterval          1;
        patches             (walls);
        rho                 rhoInf;
        log                 true;
        rhoInf              1;
        CofR                (0 0 0);
    }
}

Last edited by neko2650; July 22, 2020 at 07:59. Reason: Typo error
neko2650 is offline   Reply With Quote

Old   September 1, 2020, 00:07
Default
  #3
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 256
Rep Power: 14
quarkz is on a distinguished road
Ya I changed it but it doesn't seem to be working. Are you sure this works?
quarkz is offline   Reply With Quote

Old   September 1, 2020, 05:36
Default
  #4
New Member
 
sreekanth
Join Date: Dec 2019
Posts: 13
Rep Power: 2
neko2650 is on a distinguished road
These are the enumeration which can be given to writeControl present in functions as per OF-7.

Code:
(
 adjustableRunTime
clockTime
cpuTime
none
outputTime
runTime
timeStep
writeTime
 )
As per your requirement writeControl present in the functions has to look up for the main run time write sequence with write interval of 0.001. Hence change the enumerator from timeStep to writeTime. I hope this will work.
neko2650 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
ActuatorDiskExplicitForce in OF2.1. Help be_inspired OpenFOAM Programming & Development 10 September 14, 2018 12:12
ABAQUS Spring force Output nolanb13 Structural Mechanics 5 September 11, 2018 12:12
output force instead of Cd in console ceanwang SU2 3 August 26, 2018 01:03
drag force output file on parallel computing Jackie FLUENT 2 January 9, 2012 23:55
Fundamental output format control of field values and time dbxmcf OpenFOAM 1 January 12, 2011 11:50


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