CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

boundary condition scalarField in parallel

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 13, 2010, 12:01
Default boundary condition scalarField in parallel
  #1
nlc
Member
 
nlc's Avatar
 
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 17
nlc is on a distinguished road
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
And the const scalarField z0_ change but it is not suppose to !

To do this patch I use fixed shear stress and nut rough wall as example.

Thanks for the help !
Attached Files
File Type: gz ABLz0kWallField.tar.gz (3.1 KB, 39 views)
nlc is offline   Reply With Quote

Old   October 13, 2010, 12:06
Default
  #2
nlc
Member
 
nlc's Avatar
 
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 17
nlc is on a distinguished road
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;
    }
with include/z0Field
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
              );
nlc is offline   Reply With Quote

Old   November 1, 2010, 14:24
Default
  #3
nlc
Member
 
nlc's Avatar
 
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 17
nlc is on a distinguished road
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);
now z0 write correctly but it is still a problem with parallel since rmap and automap are not define.

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
thanks for the help

Last edited by nlc; November 1, 2010 at 14:53.
nlc is offline   Reply With Quote

Old   November 2, 2010, 10:54
Talking autoMap tryed to modify my const scalarField z0_ !!
  #4
nlc
Member
 
nlc's Avatar
 
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 17
nlc is on a distinguished road
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
and
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
are in my case related to the fact that I used a:

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
If some one can give me a cue on this error it will help me !!!
Regards
nlc is offline   Reply With Quote

Old   November 5, 2010, 20:26
Thumbs up
  #5
nlc
Member
 
nlc's Avatar
 
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 17
nlc is on a distinguished road
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
As rmap is a virtual function and the mother of my class is a template with no rmap define I got confuse. The problem was that I was calling the rmap function without template parameters. So I had to define the parameters I used. In my case : <scalar>.

I use
Code:
fvPatchField<scalar>::rmap(ptf, addr);
instead of
Code:
fvPatchField::rmap(ptf, addr);
And the error is gone !!

works fine now tanks for reading
nlc is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 12:03.