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

Contact angle for icoReactingMultiphaseInterfoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 1, 2020, 16:49
Default Contact angle for icoReactingMultiphaseInterfoam
  #1
New Member
 
Jonathan Tran
Join Date: Aug 2020
Location: University of California - Los Angeles
Posts: 5
Rep Power: 6
jqtranus is on a distinguished road
Hello,

I'm a beginner at C++, and coding in general (I'm a first year), so I'm struggling to figure this out. I've been attempting to add the contact angle model from multiphaseInterFoam into icoReactingMultiphaseInterFoam.

I'm trying to get the wall velocity by subtracting the surface velocity from the internal field velocity at the boundary.

Code:
// Calculated the component of the velocity parallel to the wall
                 vectorField Uwall
                 (
                     U().boundaryField()[patchi].patchInternalField()
                   - U().boundaryField()[patchi]
                 );
                 Uwall -= (AfHatPatch & Uwall)*AfHatPatch;
Where U() is this function:

Code:
Foam::tmp<Foam::volVectorField> Foam::phaseSystem::U() const
{
    auto tstf = tmp<volVectorField>::New
    (
        IOobject
        (
            "U",
            mesh_.time().timeName(),
            mesh_
        ),
        mesh_,
        dimensionedVector(dimVelocity, Zero)
    );

    auto& stf = tstf.ref();

    forAllConstIters(phaseModels_, iter)
    {
        stf += iter()() * iter()->U();
    }

    return tstf;
}
My problem is that I get this error:

Code:
phaseSystem/phaseSystem.C:1189:26: error: ‘class Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >’ has no member named ‘boundaryField’
                      U().boundaryField()[patchi].patchInternalField()
From what I can understand, I believe U() is returning the internal velocity field, so why can't I get the boundary field from it?

Thanks in advance.
jqtranus 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
Dynamic contact angle calculation in multiphaseInterFoam rajeshchem OpenFOAM 3 December 23, 2022 15:00
Dynamic contact angle issue: fluent UDF couldn't set the correct contact angle FelixJJ FLUENT 2 October 20, 2021 03:39
inaccurate contact angle capturing in high shear/viscousity flow chery1986 OpenFOAM Running, Solving & CFD 0 October 23, 2015 01:14
help with UDF for contact angle based on contact line velocity gandesk Fluent UDF and Scheme Programming 14 October 29, 2012 14:58
[Netgen] Import netgen mesh to OpenFOAM hsieh OpenFOAM Meshing & Mesh Conversion 32 September 13, 2011 06:50


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