|
[Sponsors] |
Adding fluid damping to linearSpring class (get access to drag coefficient) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 11, 2017, 04:40 |
Adding fluid damping to linearSpring class (get access to drag coefficient)
|
#1 |
New Member
Join Date: Feb 2017
Posts: 4
Rep Power: 9 |
Dear Foamers,
I need to implement fluid damping to the sixDoFRigidBodyMotionRestraints linearSpring class. I copied, renamed and compiled the new class (linearSpringFluidDamping) and implemented most of the necessary code (worked fine). However, I need to get access to the instantaneous drag coefficient Cd from forceCoeffs::write() during the calculation of the fluid damping. So I created a new member function in forceCoeffs.C Code:
double Foam::forceCoeffs::getCdrag() { forcesMoments fm = forces::calcForcesMoment(); scalar pDyn = 0.5*rhoRef_*magUInf_*magUInf_; vector totForce = fm.first().first() + fm.first().second(); scalar dragForce = totForce & dragDir_; scalar Cd = dragForce/(Aref_*pDyn); return Cd; } How is it possible to get access to this (Foam::forceCoeffs::getCdrag()) function from within the void Foam::sixDoFRigidBodyMotionRestraints::linearSprin gFluidDamping::restrain function from my new class (linearSpringFluidDamping) where I calculate the fluid damping (I tried a lot, but I am not so familiar with C++)? Kind regards, icab |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiphase heat transfer | pkladisios | CFX | 8 | June 7, 2016 01:41 |
error about adding Constant damping coefficient | stickjohnson | ANSYS | 0 | January 25, 2012 03:49 |
Two-Phase Buoyant Flow Issue | Miguel Baritto | CFX | 4 | August 31, 2006 12:02 |
How to apply negtive pressure to outlet | bioman66 | CFX | 5 | June 3, 2006 01:40 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 09:11 |