|
[Sponsors] |
CloudFunctionObject Referencing Issue. Erosion Q Value |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 8, 2020, 11:32 |
CloudFunctionObject Referencing Issue. Erosion Q Value
|
#1 |
Member
Join Date: Aug 2017
Posts: 32
Rep Power: 8 |
Howdy Yall I am trying make a reference to the erosion value in a kinematic colliding cloud and am getting seriously confused on how to make that reference.
My thought is that I would make the reference through dustParcels.functions().something.... (dustParcels is the name of my cloud object) Ultimately I am looking to make use of the resetQ() function and erosive Q field in order to help with my dynamic meshing in my case I am trying to set up. I apologize for the painfully simply question, but the lagrangian function references are confusing me. If anybody has a good reference I can use that would be appreciated. my call to the erosion in the dustCloudProperties constant/file Code:
cloudFunctions { particleErosion { functionObjectLibs ("libcloudFunctionObjects.so"); type particleErosion; enabled true; outputControl outputTime; log true; valueOutput true; p 11000000; //yield stress for aluminium = 11000000 Pa or 11 MPa psi 2;//Ratio of the depth of contact to the depth of cut (default value = 2 ) K 2; //Ratio of vertical to horizontal force components (2 for angular abrassive grains) patches ( obstacle ); } } Qreset() Code:
template<class CloudType> void Foam::ParticleErosion<CloudType>::resetQ() { if (QPtr_.valid()) { QPtr_->primitiveFieldRef() = 0.0; } else { const fvMesh& mesh = this->owner().mesh(); QPtr_.reset ( new volScalarField ( IOobject ( this->owner().name() + "Q", mesh.time().timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), mesh, dimensionedScalar(dimVolume, Zero) ) ); } } Code:
template<class CloudType> Foam::ParticleErosion<CloudType>::ParticleErosion ( const ParticleErosion<CloudType>& pe ) : CloudFunctionObject<CloudType>(pe), QPtr_(nullptr), patchIDs_(pe.patchIDs_), p_(pe.p_), psi_(pe.psi_), K_(pe.K_) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class CloudType> void Foam::ParticleErosion<CloudType>::preEvolve ( const typename parcelType::trackingData& td ) { resetQ(); } template<class CloudType> void Foam::ParticleErosion<CloudType>::postPatch ( const parcelType& p, const polyPatch& pp, bool& ) { const label patchi = pp.index(); const label localPatchi = applyToPatch(patchi); if (localPatchi != -1) { vector nw; vector Up; // patch-normal direction this->owner().patchData(p, pp, nw, Up); // particle velocity relative to patch const vector& U = p.U() - Up; // quick reject if particle travelling away from the patch if ((nw & U) < 0) { return; } const scalar magU = mag(U); const vector Udir = U/magU; // determine impact angle, alpha const scalar alpha = mathematical::piByTwo - acos(nw & Udir); const scalar coeff = p.nParticle()*p.mass()*sqr(magU)/(p_*psi_*K_); const label patchFacei = pp.whichFace(p.face()); scalar& Q = QPtr_->boundaryFieldRef()[patchi][patchFacei]; if (tan(alpha) < K_/6.0) { Q += coeff*(sin(2.0*alpha) - 6.0/K_*sqr(sin(alpha))); } else { Q += coeff*(K_*sqr(cos(alpha))/6.0); } } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CAMWA special issue on open-source numerical solver | feixu2019 | SU2 News & Announcements | 0 | October 1, 2018 11:19 |
Using FLUENT's Erosion Model to Investigate Erosion in a 90 degree Elbow Bend | krish.rathore | FLUENT | 0 | May 2, 2018 06:51 |
Erosion modelling | guillaume74 | FLUENT | 0 | October 3, 2016 05:02 |
Particle Tracking and Erosion modeling in CFX | srinidhi4u | CFX | 7 | June 17, 2016 06:24 |
erosion problem | libo | FLUENT | 4 | March 7, 2016 06:19 |