|
[Sponsors] |
November 17, 2009, 20:44 |
fixedGradient boundary condition
|
#1 |
Senior Member
Senthil Kabilan
Join Date: Mar 2009
Posts: 113
Rep Power: 17 |
Hi All,
I am working with scalarTransportFoam. I have specified a fixedGradient boundary condition at one of the boundary patches. inlet { type fixedGradient; gradient uniform 1.5; } I need to change the gradient value (i.e, 1.5) between iterations. Any suggestions? Thanks in advance! Senthil |
|
November 18, 2009, 14:43 |
|
#2 |
Senior Member
Senthil Kabilan
Join Date: Mar 2009
Posts: 113
Rep Power: 17 |
Finally, I figured out how to do it...
if(mesh.boundaryField()[patchIMesh1].type() == "fixedGradient") { fixedGradientFvPatchScalarField& bufferMesh1= refCast<fixedgradientfvpatchscalarfield>(T.boundar yField()[patchIMesh1]); scalarField& gradMesh1 = bufferMesh1.gradient(); forAll (bufferMesh1, faceI) { gradMesh1[faceI] = ... } } Dont forget to include fixedGradientFvPatchScalarFields.H file before main() Senthil |
|
December 3, 2009, 13:55 |
|
#3 |
Senior Member
Senthil Kabilan
Join Date: Mar 2009
Posts: 113
Rep Power: 17 |
There is an error in the aforementioned code...it should be
if(T.boundaryField()[patchIMesh1].type() == "fixedGradient") not if(mesh.boundaryField()[patchIMesh1].type() == "fixedGradient") Where T is the field that needs to be altered. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Boundary Conditions | Thomas P. Abraham | Main CFD Forum | 20 | July 7, 2013 05:05 |
Axis Boundary Condition..what is it? | CFDtoy | FLUENT | 6 | February 13, 2007 05:51 |
How to set boundary condition in Fluent for the fo | Peiyong | FLUENT | 1 | November 10, 2006 11:44 |
1 and 2 Order Boundary condition at the same place | CFD_Flo | Main CFD Forum | 4 | July 11, 2005 11:57 |
How to resolve boundary condition problem? | sam | FLUENT | 2 | July 20, 2003 02:19 |