|
[Sponsors] |
In pointPatchField, how to read coordinate values of mesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 18, 2014, 08:40 |
In pointPatchField, how to read coordinate values of mesh
|
#1 |
New Member
Jarvis
Join Date: Jun 2013
Posts: 14
Rep Power: 12 |
Hello foamers:
I want to write a new boundary based on oscillatingDisplacementPointPatchField. I want to give this boundary different values based on the mesh's coordinate values. Not a single value of the patch's coordinate, I mean different values on different girds. In this field, I can't use mesh.C() because "mesh" is not defined. Do you have any idea? Thank you! |
|
December 18, 2014, 11:03 |
|
#2 |
Senior Member
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 137
Rep Power: 19 |
This may work
Code:
const polyMesh& mesh = this->dimensionedInternalField().mesh()(); |
|
December 19, 2014, 05:51 |
|
#3 |
New Member
Jarvis
Join Date: Jun 2013
Posts: 14
Rep Power: 12 |
||
December 19, 2014, 15:44 |
|
#4 |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 17 |
I'm a little confused. Are you trying to, from a boundary condition, access the point positions of boundary mesh?
|
|
December 19, 2014, 23:52 |
|
#5 |
New Member
Jarvis
Join Date: Jun 2013
Posts: 14
Rep Power: 12 |
||
December 20, 2014, 13:21 |
|
#6 |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 17 |
Try this from within updateCoeffs()
[CODE] const pointPatch& ptPatch = this->patch(); pointField myPoints = ptPatch.localPoints(); [/CODE I hope that helps! We actually have a pretty thorough discussion of this type of boundary condition in The OpenFOAM Technology Primer: http://www.sourceflux.de/book/ I urge you to consider picking up a copy! Cheers, Kyle |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 07:38 |
Mesh Boundary Assignment Question | Wandadars | Mesh Generation & Pre-Processing | 1 | June 13, 2016 17:19 |
[Other] Cannot read a Spider mesh into Foam | evrikon | OpenFOAM Meshing & Mesh Conversion | 1 | March 14, 2012 10:13 |
Mesh Reference Values problem. | rezki | STAR-CCM+ | 7 | July 19, 2010 05:30 |
[snappyHexMesh] external flow with snappyHexMesh | chelvistero | OpenFOAM Meshing & Mesh Conversion | 11 | January 15, 2010 19:43 |