Skip to content
This repository was archived by the owner on Apr 23, 2021. It is now read-only.
This repository was archived by the owner on Apr 23, 2021. It is now read-only.

Enhancements for contactAngle BC treatment #76

@TobiasRasp

Description

@TobiasRasp

In order to deal with contact angle boundary conditions in the OpenFoam wrapper (necessary for task 5.4), I propose to add two points to the code:

  1. It would be great to be able to set the maximum Courant number to a value different to the default one, which is 1.0. I realized that the default value is too high causing unrealistic results in the case of bubble flow in a channel.
    Setting maxCo in the user script and map it to controlDict in foam_dicts.py can be done similar to CUBA.TIME_STEP etc. But for this CUBA.MAX_CO must first be included in the cuba list, of course.
  2. Appending
elif volumeFractionBCs[boundary][0] == "wettingAngle":
                    myDict = myDict + "\t type \t constantAlphaContactAngle;\n"
                    myDict = myDict + "\t theta0 \t" + str(volumeFractionBCs[boundary][1]) + ";\n"
                    myDict = myDict + "\t limit \t gradient;\n"
                    myDict = myDict + "\t value \t uniform 0;\n"

to the volumeFractionBCs block of modify_fields in foam_dicts.py allows the user to apply contact angle BCs at the walls by setting e.g.

wrapper.BC[CUBA.VOLUME_FRACTION] = {'inlet': ('fixedValue', 1),
                                    'outlet': 'zeroGradient',
                                    'walls': ('wettingAngle', 150),
                                    'frontAndBack': 'empty'}

The naming "wetting angle" can be adapted and was just my choice for testing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions