|
[Sponsors] |
Access boundary face temperatures in parallel run |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 11, 2019, 08:11 |
Access boundary face temperatures in parallel run
|
#1 |
New Member
Kaan Menekşedağ
Join Date: Jul 2017
Location: İstanbul,Türkiye
Posts: 3
Rep Power: 8 |
Hi Foamers,
I want to access boundary face temperatures in chtMultiRegionFoam (I am using OpenFoam1612+). I can reach temperature values when running in serial. // For the boundary region 6 forAll(thermoFluid[i].T().boundaryField()[6], faceI) { internaltemp[faceI]=thermoFluid[i].T().boundaryField()[6][faceI]; } But in parallel run, I can only take procesor0 values. How can i access other processor's temperature values? Thanks for any help Kaan |
|
March 1, 2019, 03:19 |
|
#2 |
New Member
Kaan Menekşedağ
Join Date: Jul 2017
Location: İstanbul,Türkiye
Posts: 3
Rep Power: 8 |
I found that it already runs on parallel processors but i could not visualize the following line for all processors:
Info<<"totalNCoarseFaces: "<<totalNCoarseFaces_<<" Local:"<<nLocalCoarseFaces_<<" Pmaster: "<<Pstream::myProcNo() <<endl; Info, cout, fprintf are only working on master node. Hence, they were not the commands i require for this case. To be able to print variables on the terminal screen Pout or Sout should be use. Following code prints on terminal for each processors: Sout<<"totalNCoarseFaces: "<<totalNCoarseFaces_<<" Local:"<<nLocalCoarseFaces_<<" Pmaster: "<<Pstream::myProcNo() <<endl; Temperature access on each processor is handling with this code. All the processors reads their own mesh and faces of boundaryfield 6. Nothing is changed apart from internaltemp[treshold+faceI] for other processors: if(Pstream::myProcNo()==0){ internaltemp[faceI]=thermoFluid[i].T().boundaryField()[6][faceI]; if(faceI==4928){ Pout <<" Sout myProcNo():"<< Pstream::myProcNo()<<" i:"<< faceI << ":T:"<<internaltemp[faceI] ; } } if(Pstream::myProcNo()==1){ internaltemp[4929+faceI]=thermoFluid[i].T().boundaryField()[6][faceI]; Pout <<" Pout myProcNo():"<< Pstream::myProcNo()<<" i:"<< faceI << ":T:"<<internaltemp[4929+faceI] ; } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 07:38 |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 04:18 |
[Netgen] Import netgen mesh to OpenFOAM | hsieh | OpenFOAM Meshing & Mesh Conversion | 32 | September 13, 2011 05:50 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 14:00 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 15:55 |