I generated a mesh consisting
I generated a mesh consisting of triangles, quadrilaterals and prismas. To each cell a set of geometric properties (from the physics) is assigned. Is there a way to assign these properties during the run or prior? How can this be achieved? These properties are necessary to calculate the momentum source term for each cell.
In order to accomplish this I need the information to which cell (it would be sufficient to know the index) each entry of the U-field belongs to. The geometric information can then be retrieved by looking at the appropriate entry of the properties field.
Moreover, how can I retrieve the velocities on a element-wise basis?
2] if cellI is your cell label
2] if cellI is your cell label:
gives you access to the cell value of U.
mesh.C()[cellI] gives you the cell centre of the cell.
1] to read in a cell-by-cell property read a volScalarField like e.g. p (see createFields.H in any solver). Just put e.g. 'calculated' b.c. on your field.
|All times are GMT -4. The time now is 20:11.|