CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Custom boundary condition not working in parallel - gSum problem? (https://www.cfd-online.com/Forums/openfoam-programming-development/136842-custom-boundary-condition-not-working-parallel-gsum-problem.html)

petr.f. June 5, 2014 07:40

Custom boundary condition not working in parallel - gSum problem?
 
Dear Foamers,

I've programmed a custom boundary condition which prescribes velocity according to pressure over patch. In the code I'm accessing all the fields in the following manner :

const fvPatchField<scalar> & pp =
patch().lookupPatchField<volScalarField, scalar>(pName_);

scalar patchArea = gSum(patch().magSf());

avgP = gSum(patch().magSf()*pp)/patchArea;

However, if I run the computation in parallel, it blows up in the first iteration (pressure values are nan).

Do you have any idea, what might be the cause of these problems?

Thanks...


All times are GMT -4. The time now is 19:48.