|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Chris
Join Date: Sep 2019
Posts: 2
Rep Power: 0 ![]() |
Hey all,
As the title suggests I want to access pressure at a specific point of my internal field, (x,y,z). I know you can use a probe to read these values and it works well, however, I am creating a coded boundary condition and I need to use the values of pressure in the internal field to calculate velocity for my boundary condition. In simple I want to do: P1 = pressure(x1,y1,z1); P2 = pressure(x2,y2,z2); Velocity = f(P1,P2); Is there a simple way I can do this? Thanks in advance. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 ![]() |
You should be able to use findCell. Something like :
Code:
point p1 = vector(x1,y1,z1); label c1 = mesh.findCell(p1); scalar pressure1 = p[c1]; Caelan |
|
![]() |
![]() |
![]() |
Tags |
internal field |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 07:56 |
problems after decomposing for running | alessio.nz | OpenFOAM | 7 | March 5, 2021 04:49 |
how to set initial velocity field expressed with cylindrical coordinate | lujianfang | OpenFOAM | 0 | November 14, 2013 01:09 |
How to setup a simple OpenFOAM cluster? | TommiPLaiho | OpenFOAM Installation | 3 | October 27, 2013 15:15 |
[blockMesh] how to get the (x,y,z) coordinate of the cells created by blockMesh | sophie_l | OpenFOAM Meshing & Mesh Conversion | 2 | April 20, 2013 06:19 |