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

How to access forces computed by "forces" functionObject within Solver

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 6, 2024, 17:44
Default How to access forces computed by "forces" functionObject within Solver
  #1
New Member
 
Pedro Almeida
Join Date: Jul 2022
Posts: 1
Rep Power: 0
palmeida is on a distinguished road
Hello,

I want to access the forces calculated by the "forces" function object within my solver. I can access the specific function object with:

Code:
label forcesId = runTime.functionObjects().findObjectID("forces")
With this I can access the functionObject, which allows me to call execute() and other functions. However, I cannot find how to access the forces from this point. Is there some way to do this from within the solver. Something like:



Code:
List<Field<vector>> myForces = runTime.functionObjects()[forcesId].<something here>
Alternatively, I can possibly calculate the forces manually with the velocity fields and mesh, but I would prefer to use the functionObject if possible. If there is any other recommendation, I would be happy to hear it.



Thank you for the help in advance,
Pedro
palmeida 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
functionObject solver, storing fields in dataBase theBananaTrick OpenFOAM Programming & Development 2 February 26, 2022 08:59
forces and forceCoeffs script is not working properly with RBF solver guptaram OpenFOAM Running, Solving & CFD 0 December 12, 2020 02:10
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
compressible two phase flow in CFX4.4 youngan CFX 0 July 1, 2003 23:32
CFX 5.5 Roued CFX 1 October 2, 2001 16:49


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