CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Compiling issue regarding to Solid Particle injector's(solidParticle) implementation (http://www.cfd-online.com/Forums/openfoam-programming-development/113566-compiling-issue-regarding-solid-particle-injectors-solidparticle-implementation.html)

liguifan February 21, 2013 23:30

Compiling issue regarding to Solid Particle injector's(solidParticle) implementation
 
I am try to implement a solid particle injector based on solidParticles and simpleFoam.

After following some guide, now I comes up some errors that I can't solve. The error happens at where I added the code in my injectorSolidParticleCloud.C, which is renamed from solidParticleCloud.C
in the Foam::solidParticleCloud::move(const dimensionedVector& g) I added the code (red) as suggested.

Quote:

void Foam::injectorSolidParticleCloud::move(const dimensionedVector& g)
{
// Injector 1
//Set injection position (z=0 if 2d)
scalar posy=0.015;
scalar posz=0;
scalar posx=-0.0203;
vector pos = vector(posx,posy,posz);
//Set initial velocity vector
vector vel=vector(0,0,0);
//Particle diameter
scalar d = 1e-3;
// Find cell at specified injection position and add particle here
label cellI=mesh_.findCell(pos);
if(cellI>=0) {
injectorSolidParticle* ptr= new injectorSolidParticle(*this,pos,cellI,d,vel);
Cloud<injectorSolidParticle>::addParticle(ptr);
}



const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho");
const volVectorField& U = mesh_.lookupObject<const volVectorField>("U");
const volScalarField& nu = mesh_.lookupObject<const volScalarField>("nu");

interpolationCellPoint<scalar> rhoInterp(rho);
interpolationCellPoint<vector> UInterp(U);
interpolationCellPoint<scalar> nuInterp(nu);

injectorSolidParticle::trackingData
td(*this, rhoInterp, UInterp, nuInterp, g.value());

Cloud<injectorSolidParticle>::move(td, mesh_.time().deltaTValue());

}

Then the errors are:
Quote:

injectorSolidParticleCloud.C: In member function ‘void Foam::injectorSolidParticleCloud::move(const Foam::dimensionedVector&)’:
injectorSolidParticleCloud.C:87: error: no matching function for call to ‘Foam::injectorSolidParticle::injectorSolidParticl e(Foam::injectorSolidParticleCloud&, Foam::vector&, Foam::label&, Foam::scalar&, Foam::vector&)’
injectorSolidParticle.H:131: note: candidates are: Foam::injectorSolidParticle::injectorSolidParticle (const Foam::polyMesh&, Foam::Istream&, bool)
injectorSolidParticleI.H:45: note: Foam::injectorSolidParticle::injectorSolidParticle (const Foam::polyMesh&, const Foam::vector&, Foam::label, Foam::label, Foam::label, Foam::scalar, const Foam::vector&)
injectorSolidParticle.H:61: note: Foam::injectorSolidParticle::injectorSolidParticle (const Foam::injectorSolidParticle&)
make: *** [Make/linuxGccDPOpt/injectorSolidParticleCloud.o] Error 1
without the red part code, it compiles fine.
Can someone helps me???:confused::confused::confused:

Kind regards,
James

Fengwei June 5, 2013 07:54

hi James :
I met the same problem like you. Have you solved the problem yet? how did you solve it?

thank you!
wei

ptr June 25, 2013 05:44

injectorsolidparticlefoam
 
Dear friends

I also have the same problem with injectorsolidparticle. When compile it shows error as follows

injectorSolidParticleCloud.C: In member function âvoid Foam::injectorSolidParticleCloud::move(const Foam::dimensionedVector&)â:
injectorSolidParticleCloud.C:87: error: no matching function for call to âFoam::injectorSolidParticle::injectorSolidParticl e(Foam::injectorSolidParticleCloud&, Foam::vector&, Foam::label&, Foam::scalar&, Foam::vector&)â
injectorSolidParticle.H:131: note: candidates are: Foam::injectorSolidParticle::injectorSolidParticle (const Foam::polyMesh&, Foam::Istream&, bool)
injectorSolidParticleI.H:45: note: Foam::injectorSolidParticle::injectorSolidParticle (const Foam::polyMesh&, const Foam::vector&, Foam::label, Foam::label, Foam::label, Foam::scalar, const Foam::vector&)
injectorSolidParticle.H:61: note: Foam::injectorSolidParticle::injectorSolidParticle (const Foam::injectorSolidParticle&)
make: *** [Make/linux64GccDPOpt/injectorSolidParticleCloud.o] Error 1

ptr June 25, 2013 05:46

do anybody knows the answer


All times are GMT -4. The time now is 21:04.