|
[Sponsors] |
May 17, 2022, 10:37 |
what does kinematicCloud.SU(Uc) return?
|
#1 |
Member
Huan Zhang
Join Date: Nov 2020
Posts: 55
Rep Power: 5 |
Dear all,
I want to know what does the momentum source function return when we call it which is defined in KinematicCloudI.H: Code:
template<class CloudType> inline Foam::tmp<Foam::fvVectorMatrix> Foam::KinematicCloud<CloudType>::SU(volVectorField& U, bool incompressible) const { if (debug) { Pout<< "UTrans min/max = " << min(UTrans()).value() << ", " << max(UTrans()).value() << nl << "UCoeff min/max = " << min(UCoeff()).value() << ", " << max(UCoeff()).value() << endl; } dimensionSet dim(dimForce); if (incompressible) { dim.reset(dimForce/dimDensity); } if (solution_.coupled()) { if (solution_.semiImplicit("U")) { volScalarField::Internal Vdt(mesh_.V()*this->db().time().deltaT()); if (incompressible) { Vdt.dimensions() *= dimDensity; } return UTrans()/Vdt - fvm::Sp(UCoeff()/Vdt, U) + UCoeff()/Vdt*U; } else { tmp<fvVectorMatrix> tfvm(new fvVectorMatrix(U, dim)); fvVectorMatrix& fvm = tfvm.ref(); fvm.source() = -UTrans()/(this->db().time().deltaT()); return tfvm; } } return tmp<fvVectorMatrix>::New(U, dim); } Code:
UTrans()/Vdt - fvm::Sp(UCoeff()/Vdt, U) + UCoeff()/Vdt*U Code:
tmp<fvVectorMatrix>::New(U, dim) I think the code returns the latter, so what does Code:
tmp<fvVectorMatrix>::New(U, dim) Kind regards, Jasper |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
No matching function error: Phase change source term added to interMixingFoam | wavefunction | OpenFOAM Programming & Development | 2 | February 4, 2022 07:46 |
Warning:no return statement in function returning non-void [-Wreturn-type] | 3014214149 | OpenFOAM Programming & Development | 1 | January 19, 2021 11:40 |
undefined reference to a C++'s class member function | linyanx | OpenFOAM Programming & Development | 5 | May 12, 2017 12:44 |
error adding void fraction into the solver & Error when chemistry is on | cmigueis | OpenFOAM Programming & Development | 23 | August 14, 2016 14:53 |
Missing math.h header | Travis | FLUENT | 4 | January 15, 2009 11:48 |