|
[Sponsors] |
June 9, 2005, 13:06 |
That's because you're in the c
|
#1 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33 |
That's because you're in the code you are setting the patch value of the fixedGradientFvPatchScalar field:
fixedGradientFvPatchScalarField& buffer= refCast<fixedgradientfvpatchscalarfield>(T.boundar yField()[patchI]); forAll (buffer, faceI) { buffer[faceI] = 0.1*(293.-T.boundaryField()[patchI][faceI]); } and you should be setting the gradient() instead. Have a look at fixedGradientFvPatchField.H. So: fixedGradientFvPatchScalarField& buffer= refCast<fixedgradientfvpatchscalarfield>(T.boundar yField()[patchI]); scalarField& grad = buffer.gradient(); forAll (grad, faceI) { grad[faceI] = 0.1*(293.-T.boundaryField()[patchI][faceI]); } (if that is what you want). Enjoy, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
what specified flux mean in boundary condition? | lucy | FLUENT | 0 | January 5, 2009 04:13 |
ask a question about Fixed Flux Boundary Condition | mahe | Phoenics | 1 | July 15, 2008 04:21 |
Boundary condition for species flux | Leverkin | FLUENT | 0 | June 9, 2008 02:19 |
constant heat flux boundary condition | Andrew Hayes | Main CFD Forum | 4 | February 19, 2006 13:54 |
scalar flux boundary condition | Murali | Siemens | 4 | May 23, 2003 11:50 |