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

contactAngle BC in contactAngleCavity tutorial is not working as expected

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 21, 2023, 07:36
Default contactAngle BC in contactAngleCavity tutorial is not working as expected
  #1
New Member
 
Iason Tsiapkinis
Join Date: Jul 2019
Posts: 8
Rep Power: 7
souvlaki41 is on a distinguished road
Hello everybory,

this is a crosspost from



https://develop.openfoam.com/Develop.../-/issues/2690


Maybe someone can help me here or point me in the right direction? I am trying to figure out, why the contactAngleCavity tutorial is not working as intended.


Summary

In the tutorial case contactAngleCavity, the free surface of a cavity is simulated with the `interfaceTrackingFvMesh` library. In the simulation a contact angle of 70° is set at the walls via the file `0.orig/contactAngle`. The contact angle after running the tutorial, however, is ~80°.


Steps to reproduce

  1. Copy the case `$FOAM_TUTORIALS/incompressible/pimpleFoam/laminar/contactAngleCavity`
  2. Add the following function objects for post-processing (this writes out the first two and last two points on the free surface):
Code:
pointHistoryLeft1
     {
        type            pointHistory;
        refHistoryPoint (0 0.01 0);
        fileName        leftPoint.txt;
    }
    pointHistoryLeft2
    {
        type            pointHistory;
        refHistoryPoint (0.00025 0.01 0);
        fileName        leftPointRef.txt;
    }
    pointHistoryRight1
    {
        type            pointHistory;
        refHistoryPoint (0.01 0.01 0);
        fileName        rightPoint.txt;
    }
    pointHistoryRight2
    {
        type            pointHistory;
        refHistoryPoint (0.00975 0.01 0);
        fileName        rightPointRef.txt;
    }
3. Calculate the angle between the first two and the last two points respectively. This can be done by running the accompanied script postProcessing.py inside the simulation directory.

Example case

I attached the tutorial case with slight modifications in the functionObjects, together with the post-processing script.
Run the case using the Allrun script.

[contactAngleCavity.tar]

What is the current *bug* behaviour?

The contact angle at the specified locations is not equal to the set contact angle.

What is the expected *correct* behavior?

The contact angle should be 70°, as specified in `0.orig/contactAngle`.

Relevant logs and/or images

The Figure below shows the calculated angle between the first two and the last two mesh points. Note that the angle does not change with a longer run time. The tutorial runs only for 0.2s.

(contactAngle.png)


Environment information

OpenFOAM version : v2212

Operating system : ubuntu docker container on windows

Possible fixes

The calculations regarding the contact angle can be found in the file
Code:
$FOAM_SRC/dynamicFaMesh/interfaceTrackingFvMesh/freeSurfacePointDisplacement.C
in lines 120-197. In this approach, the vector N is rotated by the value of contactAngle at the specified boundaries. The patchMirrorPoints at this boundary are then moved using (line 225f.):

Code:
patchMirrorPoints[patchI] =
            peCentres + ((I - 2*N*N)&delta);
Maybe the innermost controlPoints have to be moved as well to satisfy the contact angle.
Attached Images
File Type: png contactAngle.png (27.1 KB, 0 views)
Attached Files
File Type: gz contactAngleCavity.tar.gz (3.4 KB, 1 views)
souvlaki41 is offline   Reply With Quote

Old   March 21, 2023, 06:23
Default
  #2
New Member
 
Iason Tsiapkinis
Join Date: Jul 2019
Posts: 8
Rep Power: 7
souvlaki41 is on a distinguished road
Any ideas or tips?
souvlaki41 is offline   Reply With Quote

Reply

Tags
contactangle, dynamicfvmesh, dynamicmesh, multiphase, tutorial

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Virtualization] OpenFOAM oriented tutorial on using VMware Player - support thread wyldckat OpenFOAM Installation 2 July 11, 2012 16:01
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 18:44
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 06:42
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 06:25
FoamToEnsight/EnsightParts/VTK not working with motorbike tutorial madad2005 OpenFOAM Bugs 5 October 18, 2009 04:48


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