|
[Sponsors] |
Calculation of rotational equation of motion using DPMFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 15, 2014, 10:46 |
Calculation of rotational equation of motion using DPMFoam
|
#1 |
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 12 |
Hi all!!
I am working on the goldschmidt fluidized bed tutorial and realized that the torques generated by the case were below so called 'machine precision' i.e very low. Could anyone give me some insight into why the torques and corresponding angular momentum are so low?? (they are of the order 10^-8) Moreover, by looking through pairspringsliderdashpot.C I was able to infer that tangential contact force and corresponding torque are calculated as follows - Code:
vector USlip_AB = U_AB - (U_AB & rHat_AB)*rHat_AB + (pA.omega() ^ (dAEff/2*-rHat_AB)) - (pB.omega() ^ (dBEff/2*rHat_AB)); ...... // Tangential force vector fT_AB; ..... pA.torque() += (dAEff/2*-rHat_AB) ^ fT_AB; pB.torque() += (dBEff/2*rHat_AB) ^ -fT_AB; Additionally, i am quite aware that no rotational equation of motion being solved hence it is quite hard to determine the source of 'omega'. Thanks ansubru |
|
November 1, 2014, 12:42 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi ansubru,
I moved this thread of yours to the programming sub-forum, because this is a programming-heavy question you're asking. The "heavy" part is that where this code is located, is in a template class, which means that it's just a conceptual implementation and that the real implementation depends on which class is used for the replacement definition of "CloudType". For more on this topic: http://www.cplusplus.com/doc/tutorial/templates/ - search for the section entitled "Class templates" OK, the "pA" and "pB" variables are defined as follows: Code:
template<class CloudType> void Foam::PairSpringSliderDashpot<CloudType>::evaluatePair ( typename CloudType::parcelType& pA, typename CloudType::parcelType& pB ) const The trick is to now trail back where this template class "PairSpringSliderDashpot" is being implemented. A quick search lead me to the file "src/lagrangian/intermediate/parcels/include/makeParcelCollisionModels.H", where it lets us know that we should be looking for occurrences of "makeParcelCollisionModels". By looking for occurrences, it lead me to only the one in the file "src/lagrangian/intermediate/parcels/derived/basicKinematicCollidingParcel/makeBasicKinematicCollidingParcelSubmodels.C", where it states that the "CloudType" to be used is "basicKinematicCollidingCloud". Which in turn lead me to the file "src/lagrangian/intermediate/clouds/derived/basicKinematicCollidingCloud/basicKinematicCollidingCloud.H", which indicates that the actual definition of "basicKinematicCollidingCloud" is this: Code:
namespace Foam { typedef CollidingCloud < KinematicCloud < Cloud < basicKinematicCollidingParcel > > > basicKinematicCollidingCloud; } OK, the file where it's defined indicates that what were looking for is this: Code:
typedef typename CloudType::particleType parcelType; Code:
KinematicCloud::particleType Code:
typedef typename CloudType::particleType parcelType Code:
Cloud::particleType Code:
//... template<class ParticleType> class Cloud : public cloud, public IDLList<ParticleType> //... typedef ParticleType particleType; //... It tells us we're actually looking for "basicKinematicCollidingParcel". OK, more looking for the file where it's defined... I've gotten to this file "src/lagrangian/intermediate/parcels/derived/basicKinematicCollidingParcel/basicKinematicCollidingParcel.H", where it states this: Code:
typedef CollidingParcel<KinematicParcel<particle> > basicKinematicCollidingParcel; Alrighty... we now have to keep in mind that we have a new template combo to look for, namely "CollidingParcel<KinematicParcel<particle> >"...
Code:
template<class ParcelType> inline Foam::vector Foam::CollidingParcel<ParcelType>::omega() const { return angularMomentum_/this->momentOfInertia(); }
I'll let the exercise of figuring out the full expression for "omega()" on your own! Best regards, Bruno
__________________
|
|
November 1, 2014, 12:49 |
|
#3 |
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 12 |
Omg... Unbelievable... M truly in ur debt..... I had actually looked at each of those files you looked at, but I really couldn't figure it out... Guess that's why you are the openfoam god :P... Thank you so much for answering that....
BR Ananda |
|
November 1, 2014, 12:57 |
|
#5 |
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 12 |
Well ur expertise is helping a lot of guys in this forum... Thank you. ...
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calculation of motion continuity error | sasanghomi | OpenFOAM Programming & Development | 2 | March 12, 2016 17:15 |
Calculation of the Governing Equations | Mihail | CFX | 7 | September 7, 2014 07:27 |
Dynamic mesh motion based on calculation | Detian Liu | OpenFOAM Running, Solving & CFD | 0 | January 13, 2014 08:09 |
MRF and Heat transfer calculation | Susan YU | FLUENT | 0 | June 2, 2010 09:46 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |