|
[Sponsors] | |||||
|
|
|
#1 |
|
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 6 ![]() |
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 |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 6 ![]() |
Hi,
Based on the information provided on post Parabolic inlet velocity profile , 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 |
| Thread Tools | |
| Display Modes | |
|
|
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 12:26 |
| Transient outlet boundary condition problem | jwillie2000 | CFX | 1 | December 7, 2009 17:07 |
| 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 |
| How to resolve boundary condition problem? | sam | FLUENT | 2 | July 20, 2003 02:19 |