|
[Sponsors] |
September 18, 2013, 11:15 |
codedFixedValue boundaries in parallel
|
#1 |
Member
Join Date: Sep 2012
Posts: 51
Rep Power: 13 |
Hello,
I'm using the codedFixedValue to set the pressure on the outlet on my case (flowRate at the inlet, pressure on the outlets). I used the flowRate on the outlets to set the pressure. When the run is sequential, everything works fine but in parallel, the pressure isn't applied correctly. My codeDict: Code:
//reading the pressure on the considered patch const volScalarField& p = db().lookupObject<volScalarField>("p"); const fvPatchField<scalar>& pip = patch().patchField<volScalarField, scalar>(p); //reading the flowRate on the considered patch const surfaceScalarField& phi = db().lookupObject<surfaceScalarField>("phi"); const fvsPatchField<scalar>& phip = patch().patchField<surfaceScalarField, scalar>(phi); int k=0; dimensionedScalar h("h",dimless, tstep.value()); dimensionedScalar pp("pp",dimless, average(pip)); //average pressure on the patch dimensionedScalar res("res",dimless,1E6); dimensionedScalar p0("p0",dimless, 1E6); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // pp += h * sum(phip); //test (*this)==(pp.value()); #}; Code:
--> FOAM Warning : From function average(const UList<Type>&) in file /home/apps/Logiciels/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/FieldFunctions.C at line 467 empty field, returning zero I guess I'm reading and writing the pressure and flowRate correctly but I don't really know what to do. edit : I think the problem is only the access of the data on the processor patch and not the whole BC ; how can I get these data ? If someone is able to help, thank you a lot. Florian Last edited by Hiroshiman; September 18, 2013 at 14:37. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Parallel refineMesh with Cyclic Boundaries | mchurchf | OpenFOAM | 8 | December 22, 2018 11:11 |
simpleFoam in parallel issue | plucas | OpenFOAM Running, Solving & CFD | 3 | July 17, 2013 11:30 |
parallel Grief: BoundaryFields ok in single CPU but NOT in Parallel | JR22 | OpenFOAM Running, Solving & CFD | 2 | April 19, 2013 16:49 |
dynamic mesh interDyMFoam parallel run and processor boundaries | lukasfischer | OpenFOAM Running, Solving & CFD | 0 | August 12, 2009 06:36 |
Parallel Computing Classes at San Diego Supercomputer Center Jan. 20-22 | Amitava Majumdar | Main CFD Forum | 0 | January 5, 1999 12:00 |