|
[Sponsors] |
Access neighbour cells across cyclic boundary |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 17, 2018, 13:24 |
Access neighbour cells across cyclic boundary
|
#1 |
New Member
Jakob Hærvig
Join Date: Sep 2012
Location: Aalborg, Denmark
Posts: 27
Rep Power: 14 |
Hello,
I'm making a post processing utility where I need to access information across cyclic boundaries. At some point in my code I have something like: forAll (mesh.cellCells()[x], celli) { Info << mesh.cellCells()[x][celli] << endl; } This gives me ID's of neighbouring cells to cell x but not across cyclic boundaries. Does anyone know how to access this information? Best regards, Jakob |
|
September 18, 2018, 06:20 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
You can find an example of how to do this in here:
https://github.com/OpenFOAM/OpenFOAM...hScalarField.C The relevant lines are: Code:
// Get the coupling information from the mappedPatchBase const mappedPatchBase& mpp = refCast<const mappedPatchBase>(patch().patch()); const polyMesh& nbrMesh = mpp.sampleMesh(); const label samplePatchi = mpp.samplePolyPatch().index(); const fvPatch& nbrPatch = refCast<const fvMesh>(nbrMesh).boundary()[samplePatchi]; ... const turbulentTemperatureRadCoupledMixedFvPatchScalarField& nbrField = refCast <const turbulentTemperatureRadCoupledMixedFvPatchScalarField> ( nbrPatch.lookupPatchField<volScalarField, scalar>(TnbrName_) ); ... // Swap to obtain full local values of neighbour internal field scalarField TcNbr(nbrField.patchInternalField()); mpp.distribute(TcNbr); |
|
September 18, 2018, 07:20 |
|
#3 |
New Member
Jakob Hærvig
Join Date: Sep 2012
Location: Aalborg, Denmark
Posts: 27
Rep Power: 14 |
Thanks for getting back. However, with my limited experience I cannot apply it to my case.
Anyone else who can provide me with a simple working code? To be more specific I'm trying to access a volScalarField across the cyclic boundary |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops | avinashjagdale | OpenFOAM Meshing & Mesh Conversion | 53 | March 8, 2019 10:42 |
[snappyHexMesh] SnappyHexMesh for internal Flow | vishwa | OpenFOAM Meshing & Mesh Conversion | 24 | June 27, 2016 09:54 |
Cyclic Boundary Condition Errors? | nyflyer | OpenFOAM Running, Solving & CFD | 2 | April 26, 2016 15:14 |
[Netgen] Import netgen mesh to OpenFOAM | hsieh | OpenFOAM Meshing & Mesh Conversion | 32 | September 13, 2011 06:50 |
[snappyHexMesh] snappyHexMesh aborting | Tobi | OpenFOAM Meshing & Mesh Conversion | 0 | November 10, 2010 04:23 |