DLR-RY / TwoPhaseFlow

GNU General Public License v3.0
77 stars 36 forks source link

temperatureDependent #5

Open Mileseee opened 3 years ago

Mileseee commented 3 years ago

If sigma is temperatureDependent, then there may a tangential gradient of sigma. Perhaps surfaceTensionForce() in surfaceTensionForceModel.H is lack of the tangential gradient term?

tangential
HenningScheufler commented 3 years ago

This is correct. I added the temperature depended surface tension for completeness and neglected this term in the current implementation. This should be pointed out in the documentation.

references: https://www.researchgate.net/profile/Roland-Engberg-2/publication/258698745_The_impact_of_Marangoni_convection_on_fluid_dynamics_and_mass_transfer_at_deformable_single_rising_droplets_-_A_numerical_study/links/5cff6f1a4585157d15a214e6/The-impact-of-Marangoni-convection-on-fluid-dynamics-and-mass-transfer-at-deformable-single-rising-droplets-A-numerical-study.pdf

https://reader.elsevier.com/reader/sd/pii/002199919290240Y?token=2AB60B0F79D64FB7E6C8C6571DE393E2B081C7BD9E937BB833E52088EBB136E43EBAA4B1AF13A7751382B96E54AF4ABB&originRegion=eu-west-1&originCreation=20210628125640

brucethemuce commented 2 years ago

How is the temperatureDependent model setup/selected in a case?

I want use a general polynomial for the calculation of sigma, I've tried the below in thermophysicalProperties but dont think this is correct. I'm modifying the fixed flux test case for multiRegionPhaseChangeFlow.

sigma{ 
    type temperatureDependent;
        sigma polynomial
        (
            (0.001 1)
            (-4e-4 2)
        );
    };

surfaceForces
{
    sigma 0.01;
    surfaceTensionForceModel gradAlpha;
    accelerationModel gravity;
    deltaFunctionModel alphaCSF;
}
HenningScheufler commented 2 years ago
surfaceForces
{
  sigma
  {
        type    test;
        sigma   0.07;
  }
  surfaceTensionForceModel gradAlpha;
  accelerationModel gravity;
  deltaFunctionModel alphaCSF;
}

outputs:

--> FOAM FATAL IO ERROR: (openfoam-2106)
Unknown surfaceTensionModel type test

Valid surfaceTensionModel types :
3(constant liquidProperties temperatureDependent)
brucethemuce commented 2 years ago

Makes sense, but how do you prescribe the function of temperature for sigma?

  sigma
  {
        type    temperatureDependent;
        sigma   0.07; %how does this translate to a function of T?
  }

There is only one coefficient, and two are needed for mX+B form

HenningScheufler commented 2 years ago

sigma is a Function1:

https://www.openfoam.com/documentation/guides/latest/api/temperatureDependentSurfaceTension_8H_source.html

sigma is a function of the temperature. You can specify it as polynomial:

sigma{ 
    type temperatureDependent;
        sigma polynomial
        (
            (0.001 1)
            (-4e-4 2)
        );
    };
sigma{ 
    type temperatureDependent;
        sigma test; // crashes a gives options
    };

details: https://www.openfoam.com/documentation/guides/latest/api/classFoam_1_1Function1.html

https://www.openfoam.com/documentation/guides/latest/api/classFoam_1_1surfaceTensionModels_1_1temperatureDependent.html#ab11d65be145df47b2d4871fb31778c28

brucethemuce commented 2 years ago

It doesnt seem to work with multiRegionPhaseChangeFlow, the solver crashes immediately. Below is the thermophysicalProperties file for testsuite/cht/fixedFlux.

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

phases (water air);

pMin            pMin [ 1 -1 -2 0 0 0 0 ] 10000;

sigma           sigma [ 1 0 -2 0 0 0 0 ] 0;

TMin           TMin [ 0 0 0 1 0 0 0 ] 50;
TMax           TMax [ 0 0 0 1 0 0 0 ] 500;

water
{
    type pureMovingPhaseModel;
}

air
{
    type pureMovingPhaseModel;
}

surfaceForces
{
sigma
{
    type        temperatureDependent;
    sigma polynomial
    (
        (0.001 1)
        (-4e-4 2)
    );
}
  surfaceTensionForceModel gradAlpha;
  accelerationModel gravity;
  deltaFunctionModel alphaCSF;
}

// ************************************************************************* //

The sample case depthCharge2D for compressibleInterFoam works fine with this

phases          (water air);

pMin            10000;

sigma
{
    type        temperatureDependent;
    sigma polynomial
    (
        (0.001 1)
        (-4e-4 2)
    );
}
HenningScheufler commented 2 years ago

The temperature in testsuite/cht/fixedFlux is 373 K so we get a sigma of:

sigma = 0.001*T - 4e-4*T**2 = -55

This should cause a crash in the maxCapillaryNum (negative value under the root). However, this is not implemented in compressibleInterFoam:

You can write out fields, here sigma, from the registry with volFieldValue with:

writeFields true;

Now, you can check with paraview if the values are correct

https://www.openfoam.com/documentation/guides/latest/doc/guide-fos-field-volFieldValue.html https://develop.openfoam.com/Development/openfoam/-/blob/master/tutorials/multiphase/icoReactingMultiphaseInterFoam/poolEvaporation/system/controlDict