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

Output Forces Using interDyMFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 25, 2018, 11:48
Default Output Forces Using interDyMFoam
  #1
New Member
 
Emily
Join Date: Sep 2018
Posts: 10
Rep Power: 8
spaceplumber is on a distinguished road
Hello,

**EDIT: I just managed to solve this problem. As usual all it takes to figure it out yourself is asking for help. Instead of deleting I'll say what I changed in case it would be useful for anyone else. The problem seemed to come from the fact that I had not specified the CofR. I assumed it would not be needed because I didn't need moments and based on documentation I thought it was optional, but forces seems to need it to run. After a few more modifications to get the logging interval I wanted, the code now looks like this:

functions
{
#includeFunc residuals

forces
{
type forces;
libs ("libforces.so");
writeControl adjustableRunTime;
writeInterval 0.01;
patches (walls);
rho rhoInf;
log yes;
rhoInf 1000;
CofR (0 0 0);
}
}

End of edit**

I'm very new to OpenFOAM and have been trying to get a basic slosh simulation running using interDyMFoam. To get myself up to speed, I've been using the slosh tutorial files as examples, but my geometry is just a simple cube in an attempt to reduce errors. I need to output the forces on the walls exerted by the slosh, but keep getting errors when trying to do so using all examples I've found. Right now I'm trying to use this in the controlDict file:
functions
{
#includeFunc residuals

forces
{
type forces;
libs ("libforces.so");
patches (walls);
writeFields yes;
log true;
};
}
But I've been getting this error every time:
keyword origin is undefined in dictionary "C:/PROGRA~1/BLUECF~1/ofuser-of5/run/cubetest/system/controlDict.functions.forces"

file: C:/PROGRA~1/BLUECF~1/ofuser-of5/run/cubetest/system/controlDict.functions.forces from line 61 to line 65.

From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const
in file db/dictionary/dictionary.C at line 566.
At the suggestion of someone else's post, I've been trying to run the simulation using blockMesh, setFields, then interDyMFoam -postProcess. The last command was said to produce fewer errors and sometimes work better with forces than using a run file similar to the tutorials.

I've also tried using #include "forces" in the controlDict file with a separate forces file written the same way I currently have it written in the controlDict. This was based off of the propeller tutorial. I received the same error message after trying this.

I haven't been having much luck finding alternative examples or suggestions to try so any help would be much appreciated. Since I'm new to the program, I'm sure it's something simple that I either forgot or misunderstood. In case it's needed, I'm currently running version 5 of OpenFOAM. Thanks in advance!
Attached Files
File Type: txt controlDict.txt (1.5 KB, 6 views)

Last edited by spaceplumber; September 26, 2018 at 12:59. Reason: Solved problem
spaceplumber 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
Full-scale ship case with velocity using interDyMFoam show unrealistic trim angle!! lil_star OpenFOAM 0 December 4, 2017 14:00
writing execFlowFunctionObjects immortality OpenFOAM Post-Processing 30 September 15, 2013 07:16
Viscous forces (interDyMFoam) differ between OF 2.0 and later versions maxof OpenFOAM Running, Solving & CFD 2 May 30, 2013 05:17
Strange torque calculation danny123 OpenFOAM Running, Solving & CFD 5 May 7, 2013 05:59
Valve Forces in CFdesign Mike Clapp Main CFD Forum 3 March 8, 2001 15:09


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