CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Set nonuniform boundary values

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 25, 2008, 09:53
Default Hello, I would like to set
  #1
Member
 
Niklas Winkler
Join Date: Mar 2009
Location: Stockholm, Stockholm, Sweden
Posts: 73
Rep Power: 17
nikwin is on a distinguished road
Hello,

I would like to set nonuniform boundary values for the pressurefield pP from a known pressureField p, which I have done as follows for the inlet boundary, (p's boundaryType is zeroGradient at the inlet)

label inletPatchID=mesh.boundaryMesh().findPatchID("inle t");
pP.boundaryField()[inletPatchID].replace(inletPatchID,p.boundaryField()[inletPat chID]);

By looking at the results for pP it seems like its boundaryField at the inlet is set from the internalField of the cells closest to the boundary of p and not from the faces of these cells, which should be the true boundary. Or is the value at the internalField actually equal to the value at the boundary due to the zeroGradient BC?

Could someone please give me a hint if the implementation is correct for setting the boundary values? If not, is there a better and more correct way to implement a known nonuniform boundary?

All the best
/NW
nikwin is offline   Reply With Quote

Old   November 30, 2008, 08:12
Default Yes, zeroGradient will make th
  #2
Senior Member
 
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18
henrik is on a distinguished road
Yes, zeroGradient will make the face value equal to the cell value.

Not sure the above is correct because it might set the value and not the boundary condition. I would recommend

pP.boundaryField()[inletPatchID] == p.boundaryField()[inletPatchID]);

Note the "==" and read this thread

http://www.cfd-online.com/OpenFOAM_D...ges/1/202.html

Henrik
henrik is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with nonuniform boundary conditions qtian OpenFOAM Pre-Processing 4 January 12, 2018 16:03
Specifying nonuniform boundary condition maka OpenFOAM Running, Solving & CFD 59 October 22, 2014 15:52
Nonuniform boundary syntax juho OpenFOAM Running, Solving & CFD 1 December 11, 2008 17:13
Nonuniform gradient boundary condition ankgupta8um OpenFOAM Running, Solving & CFD 1 March 14, 2006 02:34
Turbulence boundary values lego CFX 9 October 25, 2002 12:55


All times are GMT -4. The time now is 17:27.