CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

fvsPatchField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 23, 2013, 05:39
Default fvsPatchField
  #1
Member
 
Join Date: Oct 2011
Posts: 37
Rep Power: 15
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
(
IOobject
(
"density2",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedVector( "zero", dimensionSet( 1, -3, 0, 0, 0, 0, 0 ), pTraits<vector>::zero ),
calculatedFvPatchField<vector>::typeName
);

It seams not to be possible to overwrite the boundary types. Independent of what I did.
Defining
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, 07:14
Default
  #2
Member
 
Andreas Ruopp
Join Date: Aug 2009
Location: Stuttgart / Germany
Posts: 31
Rep Power: 17
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

Code:
            lala().boundaryField()[PatchID()].type()
         == calculatedFvsPatchField<vector>::typeName
        )
        {
            calculatedFvsPatchField<vector>& mylala =
                refCast<calculatedFvsPatchField<vector> >
                (
                    lala().boundaryField()[PatchID()]
                );
            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, 08:11
Default
  #3
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
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?

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   July 24, 2013, 09:08
Default
  #4
Member
 
Join Date: Oct 2011
Posts: 37
Rep Power: 15
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

Reply


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 Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 11:36.