|
[Sponsors] |
March 29, 2010, 05:03 |
Manually modifying boundary condition
|
#1 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
Hi,
I would like to change the value of a Dirichlet boundary condition at just one point. I already know the label of the face at which I would like the change (in the global numbering of faces). I would like an overall idea of the logic of what to do: which classes, members function to use. Thanks |
|
April 5, 2010, 17:16 |
|
#2 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
Hi,
Based on the information provided on post http://www.cfd-online.com/Forums/ope...tml#post190696 , I used the following piece of code to fix the temperature at a specific point at the boundary: Code:
vector locFace(0.2,0,0.02); label patchID = mesh.boundaryMesh().findPatchID("down"); const polyPatch& cPatch = mesh.boundaryMesh()[patchID]; const vectorField& FaceCentres = cPatch.faceCentres(); label T2Face=0; scalar currDist=mag(FaceCentres[0] - locFace); forAll(FaceCentres,i) // in each proc, local loop over boundary faces of "inlet" { if (mag(FaceCentres[i] - locFace) < currDist) { currDist = mag(FaceCentres[i] - locFace); T2Face = i; } } T.boundaryField()[patchID][T2Face]=350; Thanks |
|
Tags |
boundary conditions, dirichlet |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How exactly the "pressure outlet" bdry condition compute properties on the boundary? | yating9901 | FLUENT | 3 | June 28, 2010 13:26 |
Transient outlet boundary condition problem | jwillie2000 | CFX | 1 | December 7, 2009 18:07 |
Axis Boundary Condition..what is it? | CFDtoy | FLUENT | 6 | February 13, 2007 06:51 |
How to set boundary condition in Fluent for the fo | Peiyong | FLUENT | 1 | November 10, 2006 12:44 |
How to resolve boundary condition problem? | sam | FLUENT | 2 | July 20, 2003 03:19 |