|
[Sponsors] |
How to access boundary field values located on other processors? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 8, 2023, 09:11 |
How to access boundary field values located on other processors?
|
#1 |
New Member
Sreehari Perumanath
Join Date: Jun 2022
Posts: 28
Rep Power: 4 |
Dear Foamers,
Hope you're having a great day. I'm solving a scalar transport equation which happens to have a fvc::div(traction) in the governing equation. The field traction here is a 'surfaceScalarField'. For trial purposes, I initialised traction = scalar(1.0) uniformly. However, I'm using cyclic boundaries, and so I changed the values of one boundary (say leftPatch) to be the negative of its cyclic neighbourPatch (i.e. rightPatch). Now when I evaluate fvc::div(traction) to add to the governing equation, which will be a volScalarField, it is uniformly 0 everywhere. This is expected and I'm happy. However, when I run the same code in parallel, the output of fvc::div(traction) is not uniformly 0 everywhere as it should be. I think this is because a given processor is not able to access boundaryField data that is located on another processor. Is there a way to solve this issue? Please let me know. Cheers, S |
|
October 10, 2023, 16:21 |
|
#2 | |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22 |
Quote:
https://github.com/UnnamedMoose/Basi.../OFtutorial5.C |
||
October 11, 2023, 04:25 |
|
#3 |
New Member
Sreehari Perumanath
Join Date: Jun 2022
Posts: 28
Rep Power: 4 |
Thank you Klausb. The link you sent will be definitely helpful.
Furthermore, 1. Could you please tell me how I can change the values of the "surfaceScalarField traction" at processor boundaries? Preferably using a loop. I saw some posts here suggesting to use pos(), neg() functions that avoid using a loop. However, in my case, I will have to give certain values to 'traction' at run time. I'm not sure if this can be done without using a for loop. 2. What does correctBoundaryConditions() do exactly? I read that it corrects the pressure values at processor boundaries when you give p.correctBoundaryConditions(). However, in my case, I only have a surfaceScalarField. So, I cannot do traction.correctBoundaryConditions(). I'm a bit confused how it works. Thanks again, S |
|
October 11, 2023, 07:03 |
|
#4 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 281
Rep Power: 22 |
Dealing with processor boundaries is tricky.
Regarding 1: Read the following but you'll have to develop your own solution. Pout and Info are your friends to see what's going on at local and global level during develoment. #4: Access patch points (on different processor) in parallel http://www.wolfdynamics.com/training...g_openfoam.pdf Flux at processor boundary Neighbouring processor number for a patch Access processor patches in parallel run |
|
October 12, 2023, 03:06 |
|
#5 |
New Member
Sreehari Perumanath
Join Date: Jun 2022
Posts: 28
Rep Power: 4 |
Thank you so much Klausb, I will have a look at these.
Have a great day! SP |
|
Tags |
boundary condition, field acces, parallel computaion |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 08:56 |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
[Other] dynamicTopoFVMesh and pointDisplacement | RandomUser | OpenFOAM Meshing & Mesh Conversion | 6 | April 26, 2018 08:30 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 18:44 |
Low Mixing time Problem | Mavier | CFX | 5 | April 29, 2013 01:00 |