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

Write Control not working for force functions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 27, 2022, 07:58
Default Write Control not working for force functions
  #1
New Member
 
N/A
Join Date: Oct 2021
Posts: 7
Rep Power: 5
twnspl is on a distinguished road
I am using OpenFOAM v2206 to simulate flow over a object. I am using the simpleFoam solver. I have force functions to extract the forces on the patches of my object. Although my write interval is at 50 the solver keeps writing at all the steps. I end up with huge file sizes which is severely restricting my resources. I have shared the control dict file here. I need some suggestions on how to stop the code from writing at every iterations and how to reduce the file size of the runs.



Code:
 /*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2106                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/



FoamFile
{
    version 2.0;
    format binary;
    class dictionary;
    location "";
    object controlDict;
}
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

application         simpleFoam;

startFrom         startTime;

startTime        0;

stopAt         endTime;

endTime        1200;

deltaT         1;

writeControl         runTime;

writeInterval        50;

purgeWrite        0;

writeFormat        ascii;

writePrecision        6;

writeCompression    on;

timeFormat        general;

timePrecision        6;

runTimeModifiable    true;

functions

{

aft_wing_forces

{

    type forces;

    libs (forces);

    patches (tw_le tw_te tw_surf);

    rho rhoInf;

    log true;

    rhoInf 1;

    CofR (0 0 0);

    writeControl runTime;

    writeInterval 10;
}


fore_wing_forces

{

    type forces;

    libs (forces);

    patches (fw_le fw_te fw_surf);

    rho rhoInf;

    log true;

    rhoInf 1;

    CofR (0 0 0);

    writeControl runTime;

    writeInterval 10;
}

tail_forces

{

    type forces;

    libs (forces);

    patches (tail_le tail_te tail_surf);

    rho rhoInf;

    log true;

    rhoInf 1;

    CofR (0 0 0);

    writeControl runTime;

    writeInterval 10;
}


fuselage_forces

{

    type forces;

    libs (forces);

    patches (fuselage);

    rho rhoInf;

    log true;

    rhoInf 1;

    CofR (0 0 0);

    writeControl runTime;

    writeInterval 10;
}

payload_forces

{

    type forces;

    libs (forces);

    patches (payload);

    rho rhoInf;

    log true;

    rhoInf 1;

    CofR (0 0 0);

    writeControl  runTime;

    writeInterval 10;    
}

payload_forces

{

    type forces;

    libs (forces);

    writeControl timeStep;

    writeInterval 10;

    patches (pylon_capylon pylon_surf);

    rho rhoInf;

    log true;

    rhoInf 1;

    CofR (0 0 0);
    
    writeControl runTime;

    writeInterval 10;
}

total_forces

{

    type forces;

    libs (forces);

    patches (tw_le tw_te tw_surf fw_le fw_te fw_surf tail_le tail_te tail_surf fuselage payload pylon_capylon pylon_surf);

    rho rhoInf;

    log true;

    rhoInf 1;

    CofR (0 0 0);
    
    writeControl  runTime;

    writeInterval 10;

}
}
twnspl is offline   Reply With Quote

Old   July 29, 2022, 13:06
Default
  #2
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15
agustinvo is on a distinguished road
If you're only interested in the fields and not in the log file (generated during your simulation) you can deactivate it.

You can check as well that your are writing some fields every 10 timeSteps. Have you tried to set a larger number of iterations, or writing when simpleFoam writes the fields? Check the different available writeControl options.

PS: I suggest to move this thread to another more suitable place
agustinvo is offline   Reply With Quote

Old   August 12, 2022, 02:58
Default
  #3
New Member
 
Jinghong Su
Join Date: Mar 2021
Posts: 3
Rep Power: 5
Su JH is on a distinguished road
// writeControl timeStep;
// writeInterval 10;
writeControl none;
executeControl timeStep;
executeInterval 10;


works
Su JH 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ansys CFX exited with return code 1. dheelibun CFX 8 May 7, 2014 08:21
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 02:41
FSI: Pressure and Normal Force don't match with expected values Geraud CFX 6 August 21, 2012 16:34
Match Control and Symmetry Boundary Condtions in a quasi 2D calculation peterputer ANSYS Meshing & Geometry 0 May 15, 2012 09:53
Working with Bessel functions? farhan CFX 0 March 25, 2009 17:42


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