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

Scheufler & Roenby - 2023 - A framework for developing two phase flow solvers...

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

Like Tree2Likes
  • 1 Post By Graciella
  • 1 Post By roenby

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 20, 2023, 20:14
Default Scheufler & Roenby - 2023 - A framework for developing two phase flow solvers...
  #1
New Member
 
Miguel Nóbrega
Join Date: Jul 2012
Posts: 24
Rep Power: 15
mnobrega is on a distinguished road
Comments and questions are welcomed on the article Scheufler & Roenby, TwoPhaseFlow: A framework for developing two phase flow solvers in OpenFOAM, November 2023, OpenFOAM Journal, https://doi.org/10.51560/ofj.v3.80

Last edited by mnobrega; December 2, 2023 at 04:21.
mnobrega is offline   Reply With Quote

Old   November 27, 2023, 20:15
Default Scheufler & Roenby - 2023 - TwoPhaseFlow: An OpenFOAM based framework..
  #2
Senior Member
 
abdikerim kurbanaliev
Join Date: Jun 2010
Location: Kyrgyzstan, Osh
Posts: 122
Rep Power: 17
kerim is on a distinguished road
Dear All,
https://doi.org/10.51560/ofj.v3.80
This DOI cannot be found in the DOI System.
kerim is offline   Reply With Quote

Old   November 28, 2023, 02:31
Default
  #3
New Member
 
Miguel Nóbrega
Join Date: Jul 2012
Posts: 24
Rep Power: 15
mnobrega is on a distinguished road
Dear Kerim,
As mentioned in the initial message this paper is still in production. It will be published in the next few days.

Last edited by mnobrega; November 29, 2023 at 02:38.
mnobrega is offline   Reply With Quote

Old   December 2, 2023, 04:23
Default
  #4
New Member
 
Miguel Nóbrega
Join Date: Jul 2012
Posts: 24
Rep Power: 15
mnobrega is on a distinguished road
Dear Kerim,

The paper was just published in the journal.


Good readings.
mnobrega is offline   Reply With Quote

Old   December 2, 2023, 11:40
Default
  #5
Senior Member
 
abdikerim kurbanaliev
Join Date: Jun 2010
Location: Kyrgyzstan, Osh
Posts: 122
Rep Power: 17
kerim is on a distinguished road
Thanks a lot!
kerim is offline   Reply With Quote

Old   December 8, 2023, 08:03
Default Error installing solver
  #6
New Member
 
Graciella
Join Date: Sep 2022
Posts: 4
Rep Power: 5
Graciella is on a distinguished road
Hello, thanks for this wonderful solver framework.
roenby likes this.

Last edited by Graciella; December 8, 2023 at 15:42.
Graciella is offline   Reply With Quote

Old   June 18, 2024, 06:10
Default
  #7
Member
 
Johan Roenby
Join Date: May 2011
Location: Denmark
Posts: 96
Rep Power: 22
roenby will become famous soon enough
A minor typo in the paper:

We refer a couple of places in the paper to the scheme pointCellLeastSquares. This should be pointCellsLeastSquares.

Cheers,
Johan
roenby is offline   Reply With Quote

Old   December 28, 2024, 18:40
Default A minor confusion regarding the transport equation for \alpha
  #8
New Member
 
Aviral Prakash
Join Date: Nov 2024
Posts: 2
Rep Power: 0
aprakash is on a distinguished road
Greetings dear authors

I am trying to leverage your compressible 2-phase solver for my research. I have a very naive question regarding equation 1. In the derivation of equation 1, it is my understanding that at some point we take \rho_k = \rho_k (p), i.e., express phase density as a function of pressure which in turn introduces the \psi_k -- phase compressibility terms. My question is that later on in equation 3, we also express rho_k that is phase density as a function of p and T. Why is T dependence not taken into account to derive the equation for \alpha i.e. equation 1 ?

* Is it because you assume pressure dominated compressibility or a weak T dependence of rho ?
* Is it because you want to simplify the transport equation for \alpha ?
* Or is it because you wish to disentangle thermal effects and treat them in the energy conservation equation ?

Is it fine to neglect T dependence of \rho in equation 1 for thermally driven phase changes ?

Maybe what is happening is that the \alpha (\partial . U) term in the RHS of equation (1) brings in the thermal influence because this term is also there in the energy conservation eqaution (6). I would deeply appreciate if you could clear my confusion.
aprakash is offline   Reply With Quote

Old   May 17, 2025, 07:49
Default
  #9
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 132
Rep Power: 13
ancolli is on a distinguished road
Hello,
Impressive work!
I'm currently encountering some issues when trying to use dynamicRefineFvMesh together with the reconstruction scheme isoSurface. For example, when running the damBreakWithObstacle case, I obtain the following:


Code:
Selected 0 split points out of a possible 563.
GAMG:  Solving for pcorr, Initial residual = 1, Final residual = 5.27418e-09, No Iterations 18
GAMG:  Solving for pcorr, Initial residual = 0.00690608, Final residual = 3.53723e-09, No Iterations 12
time step continuity errors : sum local = 1.77161e-11, global = -5.035e-12, cumulative = -1.64867e-07
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigSegv::sigHandler(int) at ??:?
#2  ? in /lib/x86_64-linux-gnu/libc.so.6
#3  void Foam::volPointInterpolation::interpolateInternalField<Foam::Vector<double> >(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::pointPatchField, Foam::pointMesh>&) const at ??:?
#4  void Foam::volPointInterpolation::interpolate<Foam::Vector<double> >(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::pointPatchField, Foam::pointMesh>&) const at ??:?
#5  Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::pointPatchField, Foam::pointMesh> > Foam::volPointInterpolation::interpolate<Foam::Vector<double> >(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::word const&, bool) const at ??:?
#6  Foam::interpolationCellPoint<Foam::Vector<double> >::interpolationCellPoint(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#7  Foam::advection::isoAdvection::timeIntegratedFlux() at ??:?
#8  void Foam::advection::isoAdvection::advect<Foam::DimensionedField<double, Foam::volMesh>, Foam::DimensionedField<double, Foam::volMesh> >(Foam::DimensionedField<double, Foam::volMesh> const&, Foam::DimensionedField<double, Foam::volMesh> const&) in ~/OpenFOAM/alejandro-v2206/platforms/linux64GccDPInt32Opt/bin/interFlow
#9  ? in ~/OpenFOAM/alejandro-v2206/platforms/linux64GccDPInt32Opt/bin/interFlow
#10  ? in /lib/x86_64-linux-gnu/libc.so.6
#11  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#12  ? in ~/OpenFOAM/alejandro-v2206/platforms/linux64GccDPInt32Opt/bin/interFlow
Segmentation fault (core dumped)
Am I missing something, or do you know how to resolve this issue?
Thanks a lot!
ancolli is offline   Reply With Quote

Old   May 17, 2025, 12:38
Default
  #10
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 132
Rep Power: 13
ancolli is on a distinguished road
Quote:
Originally Posted by ancolli View Post
Hello,
Impressive work!
I'm currently encountering some issues when trying to use dynamicRefineFvMesh together with the reconstruction scheme isoSurface. For example, when running the damBreakWithObstacle case, I obtain the following:


Code:
Selected 0 split points out of a possible 563.
GAMG:  Solving for pcorr, Initial residual = 1, Final residual = 5.27418e-09, No Iterations 18
GAMG:  Solving for pcorr, Initial residual = 0.00690608, Final residual = 3.53723e-09, No Iterations 12
time step continuity errors : sum local = 1.77161e-11, global = -5.035e-12, cumulative = -1.64867e-07
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigSegv::sigHandler(int) at ??:?
#2  ? in /lib/x86_64-linux-gnu/libc.so.6
#3  void Foam::volPointInterpolation::interpolateInternalField<Foam::Vector<double> >(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::pointPatchField, Foam::pointMesh>&) const at ??:?
#4  void Foam::volPointInterpolation::interpolate<Foam::Vector<double> >(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::pointPatchField, Foam::pointMesh>&) const at ??:?
#5  Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::pointPatchField, Foam::pointMesh> > Foam::volPointInterpolation::interpolate<Foam::Vector<double> >(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::word const&, bool) const at ??:?
#6  Foam::interpolationCellPoint<Foam::Vector<double> >::interpolationCellPoint(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#7  Foam::advection::isoAdvection::timeIntegratedFlux() at ??:?
#8  void Foam::advection::isoAdvection::advect<Foam::DimensionedField<double, Foam::volMesh>, Foam::DimensionedField<double, Foam::volMesh> >(Foam::DimensionedField<double, Foam::volMesh> const&, Foam::DimensionedField<double, Foam::volMesh> const&) in ~/OpenFOAM/alejandro-v2206/platforms/linux64GccDPInt32Opt/bin/interFlow
#9  ? in ~/OpenFOAM/alejandro-v2206/platforms/linux64GccDPInt32Opt/bin/interFlow
#10  ? in /lib/x86_64-linux-gnu/libc.so.6
#11  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#12  ? in ~/OpenFOAM/alejandro-v2206/platforms/linux64GccDPInt32Opt/bin/interFlow
Segmentation fault (core dumped)
Am I missing something, or do you know how to resolve this issue?
Thanks a lot!

I found the problem.
The correct member function in isoSurface.C should be:


Code:
// * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * * //

void Foam::reconstruction::isoSurface::reconstruct(bool forceUpdate)
{
    const bool uptodate = alreadyReconstructed(forceUpdate);

    if (uptodate && !forceUpdate)
    {
        return;
    }
    
    // Interpolating alpha1 cell centre values to mesh points (vertices)
    if (mesh_.topoChanging())
    {
        // Introduced resizing to cope with changing meshes
        if (ap_.size() != mesh_.nPoints())
        {
            ap_.resize(mesh_.nPoints());

        }
        if (interfaceCell_.size() != mesh_.nCells())
        {
            interfaceCell_.resize(mesh_.nCells());
        }
    }
    
    // Interpolating alpha1 cell centre values to mesh points (vertices)
    ap_ = volPointInterpolation::New(mesh_).interpolate(alpha1_);
    
    DynamicList<List<point>> facePts;

    interfaceLabels_.clear();

    forAll(alpha1_,cellI)
    {
            cutCell_.calcSubCell(cellI, iso_);

            if(cutCell_.cellStatus() == 0)
            {
                normal_[cellI] = cutCell_.faceArea();
                centre_[cellI] = cutCell_.faceCentre();
                if(mag(normal_[cellI]) != 0)
                {
                    interfaceCell_[cellI]=true;
                }
                else
                {
                    interfaceCell_[cellI]=false;
                    normal_[cellI] = vector::zero;
                    centre_[cellI] = vector::zero;
                }
            }
            else
            {
                normal_[cellI] = vector::zero;
                centre_[cellI] = vector::zero;
                interfaceCell_[cellI]=false;
            }

    }

}

I followed the definition in isoAlpha.C, which was working correctly.
ancolli is offline   Reply With Quote

Old   May 18, 2025, 14:15
Default
  #11
Member
 
Johan Roenby
Join Date: May 2011
Location: Denmark
Posts: 96
Rep Power: 22
roenby will become famous soon enough
Hi Alejandro


Can you provide a little more context? Was it a wrong setting in your case setup or did you find and fix a bug in the code? In the latter case, would you mind opening an issue here https://github.com/DLR-RY/TwoPhaseFlow and report the bug and fix so others can benefit from?


Cheers,
Johan
ancolli likes this.
roenby is offline   Reply With Quote

Old   May 18, 2025, 14:39
Default
  #12
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 132
Rep Power: 13
ancolli is on a distinguished road
Quote:
Originally Posted by roenby View Post
Hi Alejandro


Can you provide a little more context? Was it a wrong setting in your case setup or did you find and fix a bug in the code? In the latter case, would you mind opening an issue here https://github.com/DLR-RY/TwoPhaseFlow and report the bug and fix so others can benefit from?


Cheers,
Johan

Thanks for following up! It was indeed a bug (a small missing piece of code). I’ve already submitted a pull request with the minor modification needed. Thanks again!
ancolli is offline   Reply With Quote

Old   May 19, 2025, 04:12
Default
  #13
Member
 
Johan Roenby
Join Date: May 2011
Location: Denmark
Posts: 96
Rep Power: 22
roenby will become famous soon enough
Great, thanks! What is the pull request number?
roenby is offline   Reply With Quote

Old   May 19, 2025, 05:14
Default
  #14
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 132
Rep Power: 13
ancolli is on a distinguished road
Sorry, I'm not sure what I did, but it's now #61.
I hope it's okay now!
Regards, and sorry again!
ancolli is offline   Reply With Quote

Old   July 7, 2025, 20:08
Post Clarification for TEqn.H in multiRegionPhaseChangeFlow
  #15
New Member
 
Aviral Prakash
Join Date: Nov 2024
Posts: 2
Rep Power: 0
aprakash is on a distinguished road
In the TEqn.H for compressibleInterFlow, we have the Kinetic energy term
Code:
   
 fvScalarMatrix TEqn
    (
        fvm::ddt(rho, T) + fvm::div(rhoPhi, T) - fvm::Sp(contErr, T)
      - fvm::laplacian(turbulence.alphaEff(), T)
      + (
            fvc::div(fvc::absolute(phi, U), p)()() // - contErr/rho*p
           + (fvc::ddt(rho, K) + fvc::div(rhoPhi, K))()() - contErr*K // KE term 
        )
       *(
           alpha1()/mixture.thermo1().Cv()()
         + alpha2()/mixture.thermo2().Cv()()
        )
     ==
        fvOptions(rho, T)
    );
I understand this and I can derive this as well. However I don't think a kinetic energy term has been included for the multiRegionPhaseChangeFlow solver's TEqn.H e,g, for the vapor phase (and the Liquid phase):

Code:
    fvScalarMatrix TVEqn
    (
        fvm::ddt(rhoCpV,TV)
        + fvm::div(rhoCpVPhi,TV)
	    - fvm::Sp(fvc::ddt(rhoCpV) + fvc::div(rhoCpVPhi), TV)
        - fvm::laplacian(kappaVEff,TV)
        - dpdt*alpha2
        + phaseChange.TSource2()
            ==
        fvOptions(rhoCpV, TV)
    );
Is there a reason why this was omitted ? I too can derive this expression but I have Kinetic energy terms also.
Thanks
aprakash is offline   Reply With Quote

Old   July 8, 2025, 11:15
Default Questions Regarding the multiRegionPhaseChangeFlow Solver
  #16
New Member
 
Higor de Bitencourt Rodrigues
Join Date: May 2025
Posts: 1
Rep Power: 0
higorr is on a distinguished road
I have recently started working with OpenFOAM and the multiRegionPhaseChangeFlow solver to simulate droplet evaporation. In my current setup, the droplet evaporation case is modeled as a 2D case with the frontAndBack patches set to empty, and the lateral boundaries defined as outlet patches with a fixed temperature boundary condition (fixedValue) of 500 K applied. The droplet did evaporate, but in a highly non-uniform way, forming strange and unexpected structures. I may be misunderstanding some fundamental aspect of heat transfer or solver behavior, and I would appreciate any guidance on this.

Additionally, I modified the stefanProblem testsuite by setting the air temperature to 500 K and applying a zeroGradient boundary condition on the initially heated wall. However, I observed that the heat flux flowed from the colder water region toward the hotter air region, which seems counterintuitive. I may be misunderstanding some fundamental aspect of heat transfer or solver behavior, and I would appreciate any clarification.

Finally, the solver uses three different temperature files in the setup, and I’m a bit confused about the purpose of each.

Thank you!
higorr is offline   Reply With Quote

Reply
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
CFD with OpenFOAM online training, training provided by Technical Courses 2023 carlosrv27 OpenFOAM Announcements from Other Sources 3 October 25, 2023 15:36
OpenFOAM course for beginners Jibran OpenFOAM Announcements from Other Sources 2 November 4, 2019 09:51
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 07:25
OpenFOAM Live USB based on openSUSE 11.1 created with SUSE Studio alberto OpenFOAM 40 May 23, 2010 17:15
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 06:56


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