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

Problem with fixedGradient BC

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mike_jaworski

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 26, 2008, 16:08
Default Hello, When I try to set BC
  #1
kar
Senior Member
 
Kārlis Repsons
Join Date: Mar 2009
Location: Latvia
Posts: 111
Rep Power: 17
kar is on a distinguished road
Hello,

When I try to set BC type fixedGradient:

boundaryField
{
walls
{
type fixedGradient;
value uniform 0;
}
...
}

in 0/T file for temperature, after executing my solver I get this:
--> FOAM FATAL IO ERROR : keyword gradient is undefined in dictionary "/home/cpp/OpenFOAM/cpp-1.4.1/run/caurule/PUT/0/T::walls"

How should I define it or what else could be wrong?

K.
kar is offline   Reply With Quote

Old   February 26, 2008, 16:19
Default Karlis, The problem is ind
  #2
Senior Member
 
Michael Jaworski
Join Date: Mar 2009
Location: Champaign, IL, USA
Posts: 126
Rep Power: 17
mike_jaworski is on a distinguished road
Karlis,
The problem is indicated in the error message: keyword gradient is undefined.
The fixedGradient boundary condition should look like this:

boundaryField
{
walls
{
type fixedGradient;
gradient uniform 0;
}
...
}

i.e. there's a "keyword" of "value" used with fixedValue and a "keyword" of "gradient" used with fixedGradient BCs respectively.

Good luck,
Mike J.
sbusmayer likes this.
mike_jaworski is offline   Reply With Quote

Old   February 27, 2008, 02:42
Default Funny, right? http://www.cfd-o
  #3
kar
Senior Member
 
Kārlis Repsons
Join Date: Mar 2009
Location: Latvia
Posts: 111
Rep Power: 17
kar is on a distinguished road
Funny, right?

Where I could find that in code? find gives me a lot about "fixedGradient".
kar is offline   Reply With Quote

Old   February 27, 2008, 03:07
Default Karlis, In order to answer
  #4
Senior Member
 
Michael Jaworski
Join Date: Mar 2009
Location: Champaign, IL, USA
Posts: 126
Rep Power: 17
mike_jaworski is on a distinguished road
Karlis,
In order to answer your question, I'd have to have a lot more knowledge of OpenFOAM than I currently do. I'm still a newbie as well. I believe that it'll be in the neighborhood of this file:

http://foam.sourceforge.net/doc/Doxy...hField_8H.html

Regards,
Mike J.
mike_jaworski is offline   Reply With Quote

Old   March 8, 2008, 13:42
Default Hi Karlis, The information
  #5
Member
 
Ola Widlund
Join Date: Mar 2009
Location: Sweden
Posts: 87
Rep Power: 17
olwi is on a distinguished road
Hi Karlis,

The information you needed is actually in the User's Guide. See Table 6.3 of Section 6.2.3.

In this particular case, the answer was in the written documentation, but that is admittedly not always the case with an open-source project like OpenFOAM. Still, I think OpenFOAM is one of the very few CFD codes that can crasch and give you a useful error message! In this case that the keyword "gradient" was missing...

I use Fluent more often than OF, and I assure you that the error messages I get there are completely useless. Most of the time the process just dies on me...

Good foaming!

/Ola
olwi is offline   Reply With Quote

Old   April 22, 2015, 21:06
Default
  #6
New Member
 
Juan David Rodriguez P
Join Date: Jan 2015
Location: Milano
Posts: 20
Rep Power: 11
JuanRodriguez is on a distinguished road
Hi, Karlis.
Why would you use a fixedGradient of value 0 when there is the zeroGradient b.c.?
Perhaps that old version of OF didn't contain zeroGradient.
If the reason is more complex please let me know.
Thank you.
JuanRodriguez 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
FixedGradient Boundary Condition shrina OpenFOAM Running, Solving & CFD 4 August 22, 2019 12:08
FixedGradient BC update stefan82 OpenFOAM Running, Solving & CFD 4 April 28, 2009 04:10
Problem in Modelling Heat Transfer Problem Deepak R FLUENT 1 December 6, 2007 10:37
Problem in cavity flow problem saad Main CFD Forum 4 November 1, 2007 08:45
problem in solving "wave generation" problem san FLUENT 2 April 4, 2006 00:37


All times are GMT -4. The time now is 10:51.