|August 10, 2015, 03:29||
changing boundary cell value
Join Date: May 2014
Posts: 31Rep Power: 4
I used the following piece of code to change the boundary condition of a certain patch during each solver iteration.
label patchID = mesh.boundaryMesh().findPatchID("name of patch");
const polyPatch& cPatch = mesh.boundaryMesh()[patchID];
U.boundaryField()[patchID][faceI] == expression;
I need to define a source term which is only present at the cells that are attached to a particular patch. I hope to do this by first declaring a field that is every where zero and then during solution updating the values attached to the patch of interest, similar to updating the boundary face values in above code.
Can some one please tell me how to modify the code to access and change the values of cells attached to a boundary patch?
|August 11, 2015, 09:30||
Join Date: Jun 2010
Location: Yokohama, Japan
Blog Entries: 1Rep Power: 10
You can use faceCells() and might want to read my slide(http://www.slideshare.net/fumiyanoza...ogramming-tips).
|Thread||Thread Starter||Forum||Replies||Last Post|
|Wind turbine simulation||Saturn||CFX||45||February 8, 2016 05:42|
|Low torque values on Screw Turbine||Shaun Waters||CFX||34||July 23, 2015 08:16|
|Error finding variable "THERMX"||sunilpatil||CFX||8||April 26, 2013 07:00|
|Solution Diverging with Trimmer Mesh||rietuk||STAR-CCM+||8||February 27, 2013 05:50|
|Trimmed cell and embedded refinement mesh conversion issues||michele||OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ...||2||July 15, 2005 04:15|