|
[Sponsors] |
Access volume field in the boundary condition of a point field |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 31, 2020, 13:10 |
Access volume field in the boundary condition of a point field
|
#1 |
New Member
peyman havaej
Join Date: Jan 2016
Posts: 16
Rep Power: 10 |
Dear Foamers
I have developed a new boundary condition for a point field. In this boundary condition, I need to calculate forces that act on a specific surface; therefore, I have loaded pressure from the object registry. The code was compiled successfully but whenever I run a case with this boundary and the code wants to access to pressure field (please see below), I receive the floating-point error. here is the code: Code:
const polyMesh& pointMeshIF = this->dimensionedInternalField().mesh()(); const volScalarField& p_ = pointMeshIF.thisDb().lookupObject<volScalarField>("p"); const fvMesh& mesh = p_.mesh(); label IDts = mesh.boundaryMesh().findPatchID(targetSurface_); scalarField targetPatchPressureField = p_.boundaryField()[IDts]; I will appreciate it if anyone has any idea or suggestion about this problem. Kind regards, Peyman |
|
Tags |
boundary condition, object registry, openfoam, point fields, programing |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 06:15 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
[snappyHexMesh] determining displacement for added points | CFDnewbie147 | OpenFOAM Meshing & Mesh Conversion | 1 | October 22, 2013 10:53 |
[blockMesh] error message with modeling a cube with a hold at the center | hsingtzu | OpenFOAM Meshing & Mesh Conversion | 2 | March 14, 2012 10:56 |
RPM in Wind Turbine | Pankaj | CFX | 9 | November 23, 2009 05:05 |