|
[Sponsors] |
March 27, 2014, 15:24 |
How to get forceDensity in OpenFOAM
|
#1 |
Member
Ye Zhang
Join Date: Dec 2009
Location: Delft,Netherland
Posts: 92
Rep Power: 17 |
Dear all,
I see the sorce code of force.C. There is forceDensity fD, my question is how to get this in OF?? Thank you! Foam::forces::forcesMoments Foam::forces::calcForcesMoment() const { forcesMoments fm ( pressureViscous(vector::zero, vector::zero), pressureViscous(vector::zero, vector::zero) ); if (directForceDensity_) { const volVectorField& fD = obr_.lookupObject<volVectorField>(fDName_); const fvMesh& mesh = fD.mesh(); const surfaceVectorField::GeometricBoundaryField& Sfb = mesh.Sf().boundaryField(); forAllConstIter(labelHashSet, patchSet_, iter) { label patchi = iter.key(); vectorField Md ( mesh.C().boundaryField()[patchi] - coordSys_.origin() ); scalarField sA(mag(Sfb[patchi])); // Normal force = surfaceUnitNormal * (surfaceNormal & forceDensity) vectorField fN ( Sfb[patchi]/sA *( Sfb[patchi] & fD.boundaryField()[patchi] ) ); fm.first().first() += sum(fN); fm.second().first() += sum(Md ^ fN); // Tangential force (total force minus normal fN) vectorField fT(sA*fD.boundaryField()[patchi] - fN); |
|
May 7, 2020, 07:05 |
|
#2 |
New Member
Constance Clément
Join Date: Nov 2018
Location: Paris
Posts: 6
Rep Power: 8 |
Hi kiddmax,
Did you find a solution to your problem ? I am also wondering what is this force density in OF. I want to determine the normal/tangential force on a structure but I need to give the name of this force density in controlDict when using the lib "libforces". Thanks for your help, Constance |
|
May 12, 2020, 15:14 |
|
#3 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Hi,
- I think the force density in forces.C is a force field per unit area [N/m2]. - Some related notions can be deduced from https://en.wikipedia.org/wiki/Force_density , I think. Hope it helps.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Frequently Asked Questions about Installing OpenFOAM | wyldckat | OpenFOAM Installation | 3 | November 14, 2023 12:58 |
OpenFOAM Foundation Releases OpenFOAM v2.3.0 | opencfd | OpenFOAM Announcements from OpenFOAM Foundation | 3 | December 23, 2014 04:43 |
Problem installing OpenFOAM 1.5 installation on RHEL 4. | vwsj84 | OpenFOAM Installation | 4 | April 23, 2009 05:48 |
64bitrhel5 OF installation instructions | mirko | OpenFOAM Installation | 2 | August 12, 2008 19:07 |
OpenFOAM Training and Workshop | Hrvoje Jasak | Main CFD Forum | 0 | October 7, 2005 08:14 |