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

fixedGradient BC type with the channelOodles solver

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By santos

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 2, 2009, 12:11
Default fixedGradient BC type with the channelOodles solver
  #1
New Member
 
Quentin
Join Date: May 2009
Posts: 22
Rep Power: 16
Bedotto is on a distinguished road
Hey everyone,

I'm a beginner with OpenFoam and that's why I post here in order to get some help .

I study a turbulent couette flow in a channel and more particularly the thermodynamic aspect.
I use the channelOodles solver in which I've implemented the energy equation (in the incompressible case). My aim is to put heat fluxes on the topWall and on the bottomWall. In order to do that I've tried to put the fixedGradient condition in the 0 directory for my Temperature field. It looks like that:

////////////////////////
dimensions [0 0 0 1 0 0 0];

internalField uniform 300;

boundaryField
{
inout1
{
type cyclic;
}

inout2
{
type cyclic;
}

side1
{
type cyclic;
}

side2
{
type cyclic;
}

topWall
{
type fixedgradient;
value uniform 3.4e4;
}

bottomWall
{
type fixedgradient;
value uniform 3.0e4;
}
}
///////////////////////////

But I get some errors when I launch the solver, it sends me that:

////////////////////////
Starting time loop

Time = 0.1

Courant Number mean: 0.0552867 max: 0.585957
DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 57608.7, No Iterations 1001
bounding k, min: -4.53955e-06 max: 3.69289e-06 average: 3.91368e-10
DILUPBiCG: Solving for Ux, Initial residual = 0.00210382, Final residual = 3.47222e-06, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 2.74052e-06, No Iterations 5
DILUPBiCG: Solving for Uz, Initial residual = 0.054276, Final residual = 7.72009e-06, No Iterations 3


--> FOAM FATAL ERROR :
gradientInternalCoeffs cannot be called for a defaultFvPatchField (actual type fixedgradient)
on patch topWall of field T in file "/craya/data/brugiere/heat/0/T"
You are probably trying to solve for a field with a default boundary condition.

From function defaultFvPatchField<Type>::gradientInternalCoeffs( ) const
in file fields/fvPatchFields/basic/default/defaultFvPatchField.C at line 694.

FOAM exiting
//////////////////////

I really don't understand why this error occurs. Moreover, I thank that this condition type was written like fixedGradient with a capital G. But when I try to write with G I get the following message:

//////////////////////////////
Reading transportProperties

Reading field p

Reading field T

--> FOAM FATAL IO ERROR : keyword gradient is undefined in dictionary "/craya/data/brugiere/heat/0/T::topWall"

file: /craya/data/brugiere/heat/0/T::topWall from line 56 to line 57.

From function dictionary::lookupEntry(const word& keyword) const
in file db/dictionary/dictionary.C at line 146.

FOAM exiting
////////////////////////

It seems that openFoam doesn't recognize the fixedGradient condition.
I hope some help.

My regards.
Quentin.
Bedotto is offline   Reply With Quote

Old   June 2, 2009, 16:09
Default
  #2
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Hi Quentin,

Just enter the following:
Code:
type fixedGradient;
gradient uniform  3.4e4;
Regards,
Jose Santos
sabrinacarson likes this.
santos is offline   Reply With Quote

Old   June 3, 2009, 03:43
Default
  #3
New Member
 
Quentin
Join Date: May 2009
Posts: 22
Rep Power: 16
Bedotto is on a distinguished road
Thanks Santos! This is working well now. (sorry if my question was a bit too dumb)

Regards.

Quentin.
Bedotto is offline   Reply With Quote

Old   August 15, 2011, 11:30
Default
  #4
New Member
 
Pam
Join Date: Feb 2011
Posts: 15
Rep Power: 15
prameelar is on a distinguished road
Quote:
Originally Posted by Bedotto View Post
Hey everyone,

I'm a beginner with OpenFoam and that's why I post here in order to get some help .

I study a turbulent couette flow in a channel and more particularly the thermodynamic aspect.
I use the channelOodles solver in which I've implemented the energy equation (in the incompressible case). My aim is to put heat fluxes on the topWall and on the bottomWall. In order to do that I've tried to put the fixedGradient condition in the 0 directory for my Temperature field. It looks like that:

////////////////////////
dimensions [0 0 0 1 0 0 0];

internalField uniform 300;

boundaryField
{
inout1
{
type cyclic;
}

inout2
{
type cyclic;
}

side1
{
type cyclic;
}

side2
{
type cyclic;
}

topWall
{
type fixedgradient;
value uniform 3.4e4;
}

bottomWall
{
type fixedgradient;
value uniform 3.0e4;
}
}
///////////////////////////

But I get some errors when I launch the solver, it sends me that:

////////////////////////
Starting time loop

Time = 0.1

Courant Number mean: 0.0552867 max: 0.585957
DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 57608.7, No Iterations 1001
bounding k, min: -4.53955e-06 max: 3.69289e-06 average: 3.91368e-10
DILUPBiCG: Solving for Ux, Initial residual = 0.00210382, Final residual = 3.47222e-06, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 2.74052e-06, No Iterations 5
DILUPBiCG: Solving for Uz, Initial residual = 0.054276, Final residual = 7.72009e-06, No Iterations 3


--> FOAM FATAL ERROR :
gradientInternalCoeffs cannot be called for a defaultFvPatchField (actual type fixedgradient)
on patch topWall of field T in file "/craya/data/brugiere/heat/0/T"
You are probably trying to solve for a field with a default boundary condition.

From function defaultFvPatchField<Type>::gradientInternalCoeffs( ) const
in file fields/fvPatchFields/basic/default/defaultFvPatchField.C at line 694.

FOAM exiting
//////////////////////

I really don't understand why this error occurs. Moreover, I thank that this condition type was written like fixedGradient with a capital G. But when I try to write with G I get the following message:

//////////////////////////////
Reading transportProperties

Reading field p

Reading field T

--> FOAM FATAL IO ERROR : keyword gradient is undefined in dictionary "/craya/data/brugiere/heat/0/T::topWall"

file: /craya/data/brugiere/heat/0/T::topWall from line 56 to line 57.

From function dictionary::lookupEntry(const word& keyword) const
in file db/dictionary/dictionary.C at line 146.

FOAM exiting
////////////////////////

It seems that openFoam doesn't recognize the fixedGradient condition.
I hope some help.

My regards.
Quentin.
Hi, Coupld you guys tell me how to get gradient value (3e4/3.4e4)?
__________________
Pam
prameelar is offline   Reply With Quote

Old   April 22, 2013, 06:02
Default
  #5
New Member
 
bhushan
Join Date: Feb 2011
Location: Erlangen, Gremany
Posts: 9
Rep Power: 15
bhushanvelis is on a distinguished road
Thanks it worked for me too !!
bhushanvelis is offline   Reply With Quote

Old   April 15, 2019, 09:49
Default
  #6
New Member
 
Sabrina Carson
Join Date: May 2018
Posts: 15
Rep Power: 7
sabrinacarson is on a distinguished road
Quote:
Originally Posted by santos View Post
Hi Quentin,

Just enter the following:
Code:
type fixedGradient;
gradient uniform  3.4e4;
Regards,
Jose Santos
Thank you. This solved my problem.
sabrinacarson is offline   Reply With Quote

Reply


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
Problem with cyclic boundaries in Openfoam 1.5 fs82 OpenFOAM 36 January 7, 2015 00:31
Pressure instability with rhoSimpleFoam daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 17:08
[mesh manipulation] Using createPatch in place of couplePatches sripplinger OpenFOAM Meshing & Mesh Conversion 8 November 13, 2009 07:14
Rotation Boundary Condition rswbroers OpenFOAM Running, Solving & CFD 17 February 6, 2008 05:30
SST in 2D? Jesper Sørensen CFX 16 December 23, 2006 08:40


All times are GMT -4. The time now is 09:31.