Hi,
I am interested in calculating the drag coefficient for my geometry. I am not sure but I think we can calculate them using the forceCoeffs file in system folder inside OpenFoam. I saw that we are able to add functions to our file in the butterfly plugin like pipe example. is there a way to add forceCoeffs?
Any help would be appreciated
There is an OF function object for that, you can try adding it with the BF function object component. Start with the following code:
forces
{
type forceCoeffs;
libs (“libforces.so”);
writeControl timeStep;
writeInterval 1;
patches
(
patch_of_interest
);
Just add the actual name of the wall patch you want to assess.
Never really had to try this but might work out of the box. If it doesn’t don’t panic, OF has incredibly good error reporting (for the most part). Please share your findings!
Kind regards,
Theodore.
Thanks for the response.
I am using outdoor airflow 3d as a reference. I think the procedure should be something like this: These codes should be added to the Function component and then wired to solution parameters. After connecting solution parameters to the solution, I get this error:
- Solution exception:‘NoneType’ object has no attribute ‘terminate’
I entered the code as fallow:
forces
{
type forceCoeffs;
libs (“libforces.so”);
writeControl timeStep;
writeInterval 1;
patches
(
wall
);
}
I chose a wall for patch type since this was the only one different from the others in the blockMeshDict (other were just patches). By the way, How can we add the forces to the result list in grasshopper (the panel which is used to show p u etc. values)?
I am not able to run the code yet since I have encountered this error. I’ll post updates here again.
Sincerely,
Daniel.
Hi daniel,
you need to put the actual name of the wall patch you need to measure drag forces for (e.g “bike”, “wind”, etc.)
Regards,
Theodore.