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/)
-   -   Neumann boundary conditions (https://www.cfd-online.com/Forums/openfoam-programming-development/79066-neumann-boundary-conditions.html)

Cyp October 26, 2010 05:02

Hi Herbert!

Indeed I want to edit the BC for p from the BC of U (in the case of a two-phase Darcy law)

herbert October 26, 2010 06:47

Okay,

I was just confused because of your nomenclature...;)

mrshb4 September 7, 2011 17:48

Dear Firends!!!

I used refCast for temperture filed like this;

label patchID = mesh.boundaryMesh().findPatchID("right");
-------------------------------------------------------------------------------------------------------------
fixedGradientFvPatchScalarField& gradUPatch=refCast<fixedGradientFvPatchScalarField >(T.boundaryField()[patchID]);
scalarField& gradUField = gradUPatch.gradient();

but during compilation faced this error:
================================================== =========
solveEnergy.H:78: error: ‘fixedGradientFvPatchField’ was not declared in this scope
solveEnergy.H:78: error: ‘gradUPatch’ was not declared in this scope
solveEnergy.H:78: error: ‘fixedGradientFvPatchField’ cannot appear in a constant-expression
solveEnergy.H:78: error: no matching function for call to ‘refCast(Foam::fvPatchField<double>&)’
================================================== =========

I also add this to my header but still have error
# include "fixedGradientFvPatchFields.H"

I use fixedValue in the same way in my code but no error would occur and everything works fine!!!

what's the problem?!


All times are GMT -4. The time now is 09:07.