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

Adding extra mapped fields to kinematicSingleLayer

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 20, 2017, 09:26
Default Adding extra mapped fields to kinematicSingleLayer
  #1
New Member
 
Join Date: Nov 2016
Posts: 21
Rep Power: 9
fsch1 is on a distinguished road
hey,
I'm using the reactingParcelFilmFoam and want to implement the neglected shear force at the gas-liquid interface.
My plan is to access the calculated shearstress-tensor at the wall via the turbulence model (as done in the wallShearStress-function object).

The problem is, I can't access this data in the liquid layer, because it's an extra Region. So I want to add this information to an extra field in the kinematicSingleLayer. Then afterwards I can implement an extra force-model (e.g like the termocapillarityForce) for the shear stress.

That should be possible, right?

So I added to the constructor of kinematicSingleLayer.C an extra field where I want to write the shearStress from the turbulence model-

Code:
...
,
    devRhoReff_
    (
        IOobject
        (
            "devRhoReff",    //maybe wrong, but error stays same for e.g 'Uf'
            time().timeName(),
            regionMesh(),
            IOobject::NO_READ,
            IOobject::NO_WRITE
        )
    ),
...
In the kinematicSingleLayer.H I added the lines like done for the other fields already implemented.
Code:
...
                inline volSymmTensorField& devRhoReff();
...
            volSymmTensorField devRhoReff_;
...
            virtual const volSymmTensorField& devRhoReff() const;
...
kinematicSingleLayerI.H
Code:
...
inline volSymmTensorField& kinematicSingleLayer::devRhoReff()
{
    return devRhoReff_;
}
...
inline const volSymmTensorField& kinematicSingleLayer::devRhoReff() const
{
    return devRhoReff_;
}
...
So I didn't implement any functions, just created the fields. But still I get this error during compilation:

Code:
...
In constructor ‘Foam::regionModels::surfaceFilmModels::kinematicSingleLayer::kinematicSingleLayer(const Foam::word&, const Foam::fvMesh&, const dimensionedVector&, const Foam::word&, bool)’:
kinematicSingleLayer/kinematicSingleLayer.C:867:24: error: no matching function for call to ‘Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject)’
     addedMassTotal_(0.0)
                        ^
kinematicSingleLayer/kinematicSingleLayer.C:867:24: note: candidates are:
In file included from /home/fschilling/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/GeometricField.H:651:0,
                 from /home/xxx/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/GeometricScalarField.H:38,
                 from /home/xxx/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/GeometricFields.H:34,
                 from /home/xxx/OpenFOAM/OpenFOAM-4.1/src/finiteVolume/lnInclude/volFields.H:37,
                 from /home/xxx/OpenFOAM/OpenFOAM-4.1/src/regionModels/regionModel/lnInclude/regionModel.H:42,
                 from /home/xxx/OpenFOAM/OpenFOAM-4.1/src/regionModels/regionModel/lnInclude/singleLayerRegion.H:38,
                 from lnInclude/surfaceFilmModel.H:40,
                 from kinematicSingleLayer/kinematicSingleLayer.H:38,
                 from kinematicSingleLayer/kinematicSingleLayer.C:26:
/home/fschilling/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/GeometricField.C:663:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&, const wordList&, const wordList&) [with Type = Foam::SymmTensor<double>; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh; Foam::wordList = Foam::List<Foam::word>]
 Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
 ^
...
Does anybody got an idea where to look for the error?
Thanks!
fsch1 is offline   Reply With Quote

Old   December 4, 2018, 06:28
Default
  #2
Member
 
Martin Novák
Join Date: Dec 2012
Location: Prague
Posts: 70
Rep Power: 13
novakm is on a distinguished road
Hi.

I find this interesting. Have you manged to add the shear force in?

Thanks
Martin
novakm 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
conjugateHeatFoam + interFoam farhagim OpenFOAM Programming & Development 15 July 19, 2016 07:55
chtMultiRegionSimpleFoam samiam1000 OpenFOAM Running, Solving & CFD 39 March 31, 2016 08:43
Boundary Condition For Mapped Fields in OpenFOAM Alhasan OpenFOAM Running, Solving & CFD 32 January 11, 2014 17:51
a reconstructPar issue immortality OpenFOAM Post-Processing 8 June 16, 2013 11:25
an odd(at least for me!) reconstructPar error on a field immortality OpenFOAM Running, Solving & CFD 3 June 3, 2013 22:36


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