CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   fvsPatchField (

Peter Müller July 23, 2013 04:39

Is there any way how I can create a new fvsPatchField so that the new boundary types are all calculated. Same story with fvPatchField works. Just fvsPatchField which does strange things..

surfaceVectorField density2
dimensionedVector( "zero", dimensionSet( 1, -3, 0, 0, 0, 0, 0 ), pTraits<vector>::zero ),

It seams not to be possible to overwrite the boundary types. Independent of what I did.
surfaceVectorField lala = linearInterpolate(rho*U);
where rho is a volVectorField with only calculated and U has cyclicAMI in it the resulting field "lala" contains the cyclicAMI boundaries. How is this possible?

andyru July 23, 2013 06:14

Do you want to change the boundary type or just overwriting values at this fvsPatch? If latter is the case, you could do something like


        == calculatedFvsPatchField<vector>::typeName
            calculatedFvsPatchField<vector>& mylala =
                refCast<calculatedFvsPatchField<vector> >
            Info << "Now I manipulate my data " << endl;

            mylala.gradient() = ...;

But I am not sure, if this works, since I did that only for fvPatchFields so far.

hjasak July 24, 2013 07:11

This is called a constrained type: types like eg. processor or GGI will be enforced for you because this is required for the code to work properly.

Why would you want to enforce a different type on the constrained boundary anyway?


Peter Müller July 24, 2013 08:08

Problem was that I have a boundary for heat transfer using ami-interpolation object. The ami-interpolation should only be used for temperature boundary condition while ie velocity and pressure should be usual wall boundary conditions. Therefore on this boundary I would like to have phi calculated and not of type in the boundary file. This was no problem with 1.5 but is no more easily accesible with 2.2.

All times are GMT -4. The time now is 12:58.