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

How to access force values calculated by the function object.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 1, 2021, 13:25
Default How to access force values calculated by the function object.
  #1
New Member
 
M.H
Join Date: Dec 2013
Posts: 11
Rep Power: 12
gigili206 is on a distinguished road
Hello all,

I am currently trying to make a new immersed-boundary solver in Foam-Extend. As part of my calculations, I need to access the forces that are exerted on the immersed object. They are calculated by a function object and I can run the function object using this line of code whenever I want:

runTime.functionObjects().execute();

This will print the forces on screen and creates a forces file. I need to access these forces values to do my calculations but I don't know how. The force calculations are done in forces.C :

Foam::forces::forcesMoments Foam::forces::calcForcesMoment() const
{
.... some code ...
return fm;
}

Is there any way I can access the values calculated by the function object? Or maybe read it from the file that is dumped by the function object? Or maybe save them somehow in object registry to access them later?

Thanks in advance
gigili206 is offline   Reply With Quote

Old   June 27, 2023, 11:15
Default
  #2
New Member
 
Bailey
Join Date: Jun 2021
Posts: 14
Rep Power: 4
bjavila1409 is on a distinguished road
did you ever figure out how to do this? this is exactly what I am trying to do now but I cannot find much help online
bjavila1409 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
The CoP Does not exist: Validating Aerodynamic forces through a "line of action" ds4719 Main CFD Forum 14 February 18, 2022 18:05
Drag Force Ratio for Flat Plate Rob Wilk Main CFD Forum 40 May 10, 2020 04:47
[mesh manipulation] RefineMesh Error and Foam warning jiahui_93 OpenFOAM Meshing & Mesh Conversion 4 March 3, 2018 11:32
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 14:11
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51


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