|
[Sponsors] |
August 2, 2012, 23:43 |
change values of a surfaceSalarField at boundary
|
#1 |
New Member
kob
Join Date: Nov 2011
Posts: 28
Rep Power: 14 |
Hello everyone
I want to change values of a surfaceSalarField sphi at boundary 'surface'.To other regions,the values keep default.So I write a piece of code : Code:
sphi=sigma*(interpolate(U) &mesh.Sf())-fvc::snGrad(ha); label patchI=mesh.boundaryMesh().findPatchID("surface"); forAll(sphi,patchI) { sphi[patchI]=sigma*(interpolate(U) &mesh.Sf()); } But this is wrong.So can you tell me how to modify the above code? regards! bryant Last edited by bryant_k; August 3, 2012 at 02:58. |
|
Tags |
change values |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
The FOAM Documentation Project - SHUT-DOWN | holger_marschall | OpenFOAM | 242 | March 7, 2013 12:30 |
How to make code run in parallel? | cwang5 | OpenFOAM Programming & Development | 1 | May 30, 2011 04:47 |
Open Source Vs Commercial Software | MechE | OpenFOAM | 28 | May 16, 2011 11:02 |
Design Integration with CFD? | John C. Chien | Main CFD Forum | 19 | May 17, 2001 15:56 |
public CFD Code development | Heinz Wilkening | Main CFD Forum | 38 | March 5, 1999 11:44 |