|
[Sponsors] |
October 13, 2010, 12:01 |
boundary condition scalarField in parallel
|
#1 |
Member
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 17 |
I'm trins to compile my boundary condition using a scalarField It work but in parallel I get this warning:
Code:
--> FOAM Warning : From function Field<Type>::Field(const word& keyword, const dictionary&, const label) in file /home/niko/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/Field.C at line 262 Reading "/home/niko/OpenFOAM/niko-1.7.1/run/AEMN/testcase/ABL_kepsilonGroundShear/processor0/0/U::boundaryField::ground" from line 102 to line 105 expected keyword 'uniform' or 'nonuniform', assuming deprecated Field format from Foam version 2.0. Reading/calculating face flux field phi To do this patch I use fixed shear stress and nut rough wall as example. Thanks for the help ! |
|
October 13, 2010, 12:06 |
|
#2 |
Member
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 17 |
The k file in the 0 folder has the ground boundary define:
Code:
ground { type ABLz0kWall; //z0 uniform 0.1; /**/ #include "include/z0Field" z0 nonuniform $z0Field; /**/ kappa 0.41; Cmu 0.09; } Code:
z0Field List<scalar> 75(0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 ); |
|
November 1, 2010, 14:24 |
|
#3 |
Member
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 17 |
I found an error that solve part of the problem, but now I try to use rmap and automap to make it possible to use in parallel.
My error was that in the write function I did not use the right function too write z0_ so I change it for: Code:
z0_.writeEntry("z0", os); I try to add them as it is add in turbulentHeatFluxTemperatureFvPatchScalarField but i get this error: Code:
Wall/epsilonWallFunctions/ABLz0epsilonWallFunction/ABLz0epsilonWallFunction.C: In member function ‘virtual void Foam::incompressible::RASModels::ABLz0epsilonWallFunction::autoMap(const Foam::fvPatchFieldMapper&)’: Wall/epsilonWallFunctions/ABLz0epsilonWallFunction/ABLz0epsilonWallFunction.C:286: error: passing ‘const Foam::scalarField’ as ‘this’ argument of ‘void Foam::Field<Type>::autoMap(const Foam::FieldMapper&) [with Type = float]’ discards qualifiers Wall/epsilonWallFunctions/ABLz0epsilonWallFunction/ABLz0epsilonWallFunction.C: In member function ‘virtual void Foam::incompressible::RASModels::ABLz0epsilonWallFunction::rmap(const Foam::fvPatchScalarField&, const Foam::labelList&)’: Wall/epsilonWallFunctions/ABLz0epsilonWallFunction/ABLz0epsilonWallFunction.C:296: error: ‘template<class Type> class Foam::fvPatchField’ used without template parameters Wall/epsilonWallFunctions/ABLz0epsilonWallFunction/ABLz0epsilonWallFunction.C:304: error: passing ‘const Foam::scalarField’ as ‘this’ argument of ‘void Foam::Field<Type>::rmap(const Foam::UList<T>&, const Foam::unallocLabelList&) [with Type = float]’ discards qualifiers make: *** [Make/linux64GccSPOpt/ABLz0epsilonWallFunction.o] Erreur 1 Last edited by nlc; November 1, 2010 at 14:53. |
|
November 2, 2010, 10:54 |
autoMap tryed to modify my const scalarField z0_ !!
|
#4 |
Member
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 17 |
apparently the too errors
Code:
Wall/epsilonWallFunctions/ABLz0epsilonWallFunction/ABLz0epsilonWallFunction.C:294: error: passing ‘const Foam::scalarField’ as ‘this’ argument of ‘void Foam::Field<Type>::autoMap(const Foam::FieldMapper&) [with Type = float]’ discards qualifiers Code:
Wall/epsilonWallFunctions/ABLz0epsilonWallFunction/ABLz0epsilonWallFunction.C:313: error: passing ‘const Foam::scalarField’ as ‘this’ argument of ‘void Foam::Field<Type>::rmap(const Foam::UList<T>&, const Foam::unallocLabelList&) [with Type = float]’ discards qualifiers const scalarField z0_; I change it for a: scalarField z0_; And those too error disappear. I guess it means i tried to modify the constant class z0_ with autoMap. So autoMap modify the member of the class !!! One day I'll get use to c++ error message. But now I'm still learning c++ !! but still this error remains Code:
Wall/epsilonWallFunctions/ABLz0epsilonWallFunction/ABLz0epsilonWallFunction.C: In member function ‘virtual void Foam::incompressible::RASModels::ABLz0epsilonWallFunction::rmap(const Foam::fvPatchScalarField&, const Foam::labelList&)’: Wall/epsilonWallFunctions/ABLz0epsilonWallFunction/ABLz0epsilonWallFunction.C:304: error: ‘template<class Type> class Foam::fvPatchField’ used without template parameters Regards |
|
November 5, 2010, 20:26 |
|
#5 |
Member
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 17 |
Found the reason for the error :
Code:
Wall/epsilonWallFunctions/ABLz0epsilonWallFunction/ABLz0epsilonWallFunction.C: In member function ‘virtual void Foam::incompressible::RASModels::ABLz0epsilonWallFunction::rmap(const Foam::fvPatchScalarField&, const Foam::labelList&)’: Wall/epsilonWallFunctions/ABLz0epsilonWallFunction/ABLz0epsilonWallFunction.C:304: error: ‘template<class Type> class Foam::fvPatchField’ used without template parameters I use Code:
fvPatchField<scalar>::rmap(ptf, addr); Code:
fvPatchField::rmap(ptf, addr); works fine now tanks for reading |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
asking for Boundary condition in FLUENT | Destry | FLUENT | 0 | July 27, 2010 01:55 |
External Radiation Boundary Condition for Grid Interface | CFD XUE | FLUENT | 0 | July 9, 2010 03:53 |
External Radiation Boundary Condition (Two sided wall), Grid Interface | CFD XUE | FLUENT | 0 | July 8, 2010 07:49 |
problem with boundary condition??? | smn | CFX | 5 | November 24, 2009 07:37 |
How to set boundary condition in Fluent for the fo | Peiyong | FLUENT | 1 | November 10, 2006 12:44 |