|
[Sponsors] |
May 27, 2006, 09:46 |
Hello! I want to implement the
|
#1 |
Guest
Posts: n/a
|
Hello! I want to implement the following code to a application I have created. But Im not quite sure how to use the mesh.V() and mesh.Sf() functions.
label holePatchi = mesh.boundaryMesh().findPatchID("hole"); if (holePatchi != -1) { solve ( fvm::div(phi, T) - fvm::laplacian(alphaEff, T) +mesh.V()*q/(rho*Cp*mesh.Sf()) ); } else { solve ( fvm::div(phi, T) - fvm::laplacian(alphaEff, T) ); } In the if operation im interested in doing a calculation which involves multiplication with the surface area that is in contact with the patch called "hole" and im also intrested in dividing with the volume of this cell. When compiling this I get the following error message: Making dependency list for source file fluxSimpleFoam.C SOURCE_DIR=. SOURCE=fluxSimpleFoam.C ; g++ -m32 -Dlinux -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -ffast-math -DNoRepository -ftemplate-depth-30 -I/home/erik/OpenFOAM/OpenFOAM-1.2/src/cfdTools/incompressible -I/home/erik/OpenFOAM/OpenFOAM-1.2/src/cfdTools/general/lnInclude -I/home/erik/OpenFOAM/OpenFOAM-1.2/src/turbulenceModels -I/home/erik/OpenFOAM/OpenFOAM-1.2/src/transportModels -I/home/erik/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread -c $SOURCE -o Make/linuxGcc4Opt/fluxSimpleFoam.o TT.H: In function 'int main(int, char**)': TT.H:48: error: no match for 'operator*' in 'Foam::operator*(const Foam::dimensioned<foam::scalar>&, const Foam::dimensioned<type>&) [with Type = Foam::scalar](((const Foam::dimensioned<foam::scalar>&)((const Foam::dimensioned<foam::scalar>*)(& Cp)))) * mesh. Foam::fvMesh::V()' /home/erik/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/dimensionSet.H:194: note: candidates are: Foam::dimensionSet Foam::operator*(const Foam::dimensionSet&, const Foam::dimensionSet&) /home/erik/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/dimensionedScalar.H:58: note: Foam::dimensionedScalar Foam::operator*(const Foam::dimensionedScalar&, Foam::scalar) /home/erik/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/FieldFunctions.C:676: note: Foam::tmp<foam::field<type> > Foam::operator*(const Foam::UList<foam::scalar>&, const Foam::UList<t>&) [with Type = Foam::scalar] /home/erik/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/FieldFunctions.C:678: note: Foam::tmp<foam::field<type> > Foam::operator*(const Foam::tmp<foam::field<foam::scalar> >&, const Foam::UList<t>&) [with Type = Foam::scalar] /home/erik/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/FieldFunctions.C:777: note: Foam::tmp<foam::field<type> > Foam::operator*(const Foam::scalar&, const Foam::UList<t>&) [with Type = Foam::scalar] /home/erik/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/tensorField.H:53: note: Foam::tmp<foam::vectorfield> Foam::operator*(const Foam::tmp<foam::tensorfield>&) /home/erik/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/tensorField.H:56: note: Foam::tmp<foam::tensorfield> Foam::operator*(const Foam::tmp<foam::vectorfield>&) /home/erik/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/dimensionedTensor.H:70: note: Foam::dimensionedVector Foam::operator*(const Foam::dimensionedTensor&) /home/erik/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/dimensionedTensor.H:73: note: Foam::dimensionedTensor Foam::operator*(const Foam::dimensionedVector&) make: *** [Make/linuxGcc4Opt/fluxSimpleFoam.o] Error 1 Could anybody please give me a hint in order to get this right? Thanks /Erik |
|
May 29, 2006, 07:23 |
It seems as I need to definate
|
#2 |
Guest
Posts: n/a
|
It seems as I need to definate the scalar * matrix operation differently from mesh.V()*q.
Does anyone know how to make this calculation? Thanks Erik |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
LinearInterpolaterhoU amp meshSf exact meaning | arkangel | OpenFOAM Running, Solving & CFD | 2 | August 21, 2007 06:29 |