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

Using volPointInterpolation in modified FvPatchVectorField BC

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By jtyson

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 11, 2017, 16:53
Default Using volPointInterpolation in modified FvPatchVectorField BC
  #1
New Member
 
Joseph Tyson
Join Date: Jul 2017
Posts: 1
Rep Power: 0
jtyson is on a distinguished road
Hello all,

I'm currently trying to model mesh motion for a rectangular slab due to strain induced from small chemical species (e.g. water) diffusion into a material. I've modified solidDisplacementFoam to include dynamic mesh motion (displacementLaplacianFvMotionSolver).

The mesh moves when I put a uniform time varying boundary condition into the "top" patch in the 0/pointDisplacement file. However, I want pointDisplacement to be dependent on the calculated displacement during runtime. To accomplish this, I'm attempting to modify a copy of the tractionDisplacementFvPatchVectorField to use in the 0/pointDisplacement file similar to how the tractionDisplacement BC is used in 0/D.

PROBLEM
I need to change the volVectorField D into a pointVectorField for use in 0/pointDisplacement. I've read all that I could find about volPointInterpolation, but I'm still having trouble understanding how to use it.

This is the portion of the code that I have placed the volPointInterpolation.


Code:
 void pDisplacementFvPatchVectorField::updateCoeffs()
{
    if (updated())
    {
        return;
    }


        const fvPatchField<vector>& Disp =
            patch().lookupPatchField<volVectorField, vector>("D");

    volPointInterpolation interpolateVolPoint (mesh);
    pointVectorField DispP = interpolateVolPoint.interpolate(Disp);
    
    operator==
        (
        DispP
        );

    fixedGradientFvPatchVectorField::updateCoeffs();
}
And I am receiving these notes and errors when I try wclean/wmake:

Code:
pointDisp2/pointDisplacement2FvPatchVectorField.C: In member function ‘virtual void Foam::pDisplacementFvPatchVectorField::updateCoeffs()’:
pointDisp2/pointDisplacement2FvPatchVectorField.C:142:45: error: ‘mesh’ was not declared in this scope
  volPointInterpolation interpolateVolPoint (mesh);
                                             ^
pointDisp2/pointDisplacement2FvPatchVectorField.C:143:63: error: no matching function for call to ‘Foam::volPointInterpolation::interpolate(const Foam::fvPatchField<Foam::Vector<double> >&)’
  pointVectorField DispP = interpolateVolPoint.interpolate(Disp);
                                                               ^
In file included from pointDisp2/pointDisplacement2FvPatchVectorField.C:29:0:
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:155:63: note: candidate: template<class Type> Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> > Foam::volPointInterpolation::interpolate(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) const
         tmp<GeometricField<Type, pointPatchField, pointMesh>> interpolate
                                                               ^
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:155:63: note:   template argument deduction/substitution failed:
pointDisp2/pointDisplacement2FvPatchVectorField.C:143:63: note:   ‘const Foam::fvPatchField<Foam::Vector<double> >’ is not derived from ‘const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>’
  pointVectorField DispP = interpolateVolPoint.interpolate(Disp);
                                                               ^
In file included from pointDisp2/pointDisplacement2FvPatchVectorField.C:29:0:
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:163:63: note: candidate: template<class Type> Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> > Foam::volPointInterpolation::interpolate(const Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >&) const
         tmp<GeometricField<Type, pointPatchField, pointMesh>> interpolate
                                                               ^
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:163:63: note:   template argument deduction/substitution failed:
pointDisp2/pointDisplacement2FvPatchVectorField.C:143:63: note:   ‘const Foam::fvPatchField<Foam::Vector<double> >’ is not derived from ‘const Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >’
  pointVectorField DispP = interpolateVolPoint.interpolate(Disp);
                                                               ^
In file included from pointDisp2/pointDisplacement2FvPatchVectorField.C:29:0:
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:173:63: note: candidate: template<class Type> Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> > Foam::volPointInterpolation::interpolate(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, const wordList&) const
         tmp<GeometricField<Type, pointPatchField, pointMesh>> interpolate
                                                               ^
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:173:63: note:   template argument deduction/substitution failed:
pointDisp2/pointDisplacement2FvPatchVectorField.C:143:63: note:   ‘const Foam::fvPatchField<Foam::Vector<double> >’ is not derived from ‘const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>’
  pointVectorField DispP = interpolateVolPoint.interpolate(Disp);
                                                               ^
In file included from pointDisp2/pointDisplacement2FvPatchVectorField.C:29:0:
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:184:63: note: candidate: template<class Type> Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> > Foam::volPointInterpolation::interpolate(const Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >&, const wordList&) const
         tmp<GeometricField<Type, pointPatchField, pointMesh>> interpolate
                                                               ^
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:184:63: note:   template argument deduction/substitution failed:
pointDisp2/pointDisplacement2FvPatchVectorField.C:143:63: note:   ‘const Foam::fvPatchField<Foam::Vector<double> >’ is not derived from ‘const Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >’
  pointVectorField DispP = interpolateVolPoint.interpolate(Disp);
                                                               ^
In file included from pointDisp2/pointDisplacement2FvPatchVectorField.C:29:0:
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:193:48: note: candidate: template<class Type> Foam::tmp<Foam::DimensionedField<Type, Foam::pointMesh> > Foam::volPointInterpolation::interpolate(const Foam::DimensionedField<Type, Foam::volMesh>&) const
         tmp<DimensionedField<Type, pointMesh>> interpolate
                                                ^
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:193:48: note:   template argument deduction/substitution failed:
pointDisp2/pointDisplacement2FvPatchVectorField.C:143:63: note:   ‘const Foam::fvPatchField<Foam::Vector<double> >’ is not derived from ‘const Foam::DimensionedField<Type, Foam::volMesh>’
  pointVectorField DispP = interpolateVolPoint.interpolate(Disp);
                                                               ^
In file included from pointDisp2/pointDisplacement2FvPatchVectorField.C:29:0:
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:201:48: note: candidate: template<class Type> Foam::tmp<Foam::DimensionedField<Type, Foam::pointMesh> > Foam::volPointInterpolation::interpolate(const Foam::tmp<Foam::DimensionedField<Type, Foam::volMesh> >&) const
         tmp<DimensionedField<Type, pointMesh>> interpolate
                                                ^
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:201:48: note:   template argument deduction/substitution failed:
pointDisp2/pointDisplacement2FvPatchVectorField.C:143:63: note:   ‘const Foam::fvPatchField<Foam::Vector<double> >’ is not derived from ‘const Foam::tmp<Foam::DimensionedField<Type, Foam::volMesh> >’
  pointVectorField DispP = interpolateVolPoint.interpolate(Disp);
                                                               ^
In file included from pointDisp2/pointDisplacement2FvPatchVectorField.C:29:0:
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:239:18: note: candidate: template<class Type> void Foam::volPointInterpolation::interpolate(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>&) const
             void interpolate
                  ^
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:239:18: note:   template argument deduction/substitution failed:
pointDisp2/pointDisplacement2FvPatchVectorField.C:143:63: note:   ‘const Foam::fvPatchField<Foam::Vector<double> >’ is not derived from ‘const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>’
  pointVectorField DispP = interpolateVolPoint.interpolate(Disp);
                                                               ^
In file included from pointDisp2/pointDisplacement2FvPatchVectorField.C:29:0:
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:248:67: note: candidate: template<class Type> Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> > Foam::volPointInterpolation::interpolate(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, const Foam::word&, bool) const
             tmp<GeometricField<Type, pointPatchField, pointMesh>> interpolate
                                                                   ^
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:248:67: note:   template argument deduction/substitution failed:
pointDisp2/pointDisplacement2FvPatchVectorField.C:143:63: note:   ‘const Foam::fvPatchField<Foam::Vector<double> >’ is not derived from ‘const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>’
  pointVectorField DispP = interpolateVolPoint.interpolate(Disp);
                                                               ^
In file included from pointDisp2/pointDisplacement2FvPatchVectorField.C:29:0:
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:267:52: note: candidate: template<class Type> Foam::tmp<Foam::DimensionedField<Type, Foam::pointMesh> > Foam::volPointInterpolation::interpolate(const Foam::DimensionedField<Type, Foam::volMesh>&, const Foam::word&, bool) const
             tmp<DimensionedField<Type, pointMesh>> interpolate
                                                    ^
/home/joey/OpenFOAM/OpenFOAM-v1612+/src/finiteVolume/lnInclude/volPointInterpolation.H:267:52: note:   template argument deduction/substitution failed:
pointDisp2/pointDisplacement2FvPatchVectorField.C:143:63: note:   ‘const Foam::fvPatchField<Foam::Vector<double> >’ is not derived from ‘const Foam::DimensionedField<Type, Foam::volMesh>’
  pointVectorField DispP = interpolateVolPoint.interpolate(Disp);
                                                               ^
I would appreciate any help with this problem. I'm still new to OpenFOAM and C++, so any help is appreciated.

Thank you,
Joey
sdutta likes this.
jtyson is offline   Reply With Quote

Reply

Tags
dynamicmesh, fvpatchvectorfield, pointdisplacement, volpointinterpolation


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[General] Extracting ParaView Data into Python Arrays Jeffzda ParaView 30 November 6, 2023 22:00
Modified simpleFOAM using given Reynolds stress field K62 OpenFOAM Running, Solving & CFD 2 March 24, 2017 04:41
reconstructPar for modified lagrangian libraries oswald OpenFOAM Programming & Development 0 October 20, 2014 06:23
Modified rhoCentralFoam slip boundary fails in parallel ChrisA OpenFOAM Programming & Development 0 June 25, 2014 21:28
Modified Equation for CFX algorithm Craig Johansen CFX 0 August 28, 2004 00:02


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