CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development


Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   July 23, 2013, 04:39
Default fvsPatchField
Join Date: Oct 2011
Posts: 36
Rep Power: 8
Peter Müller is on a distinguished road
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?
Peter Müller is offline   Reply With Quote

Old   July 23, 2013, 06:14
Andreas Ruopp
Join Date: Aug 2009
Location: Stuttgart / Germany
Posts: 31
Rep Power: 10
andyru is on a distinguished road
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.
andyru is offline   Reply With Quote

Old   July 24, 2013, 07:11
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,806
Rep Power: 25
hjasak will become famous soon enough
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?

Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting:
hjasak is offline   Reply With Quote

Old   July 24, 2013, 08:08
Join Date: Oct 2011
Posts: 36
Rep Power: 8
Peter Müller is on a distinguished road
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.
Peter Müller is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT -4. The time now is 20:50.