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

How to add turbulence model and VOF to a new two-step projection OpenFOAM solver

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 30, 2022, 08:36
Default How to add turbulence model and VOF to a new two-step projection OpenFOAM solver
  #1
New Member
 
Shuo Mi
Join Date: Nov 2020
Location: London
Posts: 19
Rep Power: 5
Msure is on a distinguished road
Hello everyone,

I wrote an OpenFOAM solver using two steps projection method, not using original PISO or PIMPLE in OpenFOAM. The second-order Adams-bashforth for time scheme is used.
Code:
        fvVectorMatrix UEqn
        (

          fvm::ddt(U)
          + 1.5*fvc::div(phi, U) - 0.5*fvc::div(phi.oldTime(), U.oldTime())
          == 1.5*fvm::laplacian(nu, U) - 0.5*fvc::laplacian(nu, U)
          + 0.5*fvc::grad(p)
         
        );

        fvScalarMatrix pEqn
        (
            fvm::laplacian(p) == 2.0/3.0*fvc::div(phi)/dt
        );
I got two questions, thanks for everyone who has some ideas about this:
1. How to add turbulence model?
Is it right that using nuEff() to replace the nu directly?
2. How to add VOF model?
I have no idea about this.

Thanks a lot!

Regards,
Shuo
Msure is offline   Reply With Quote

Old   November 3, 2022, 15:08
Default
  #2
Member
 
Federico Zabaleta
Join Date: May 2016
Posts: 47
Rep Power: 10
fedez91 is on a distinguished road
Hello Msure

1- You should check out the implementation of turbulence in other models, such as pisoFoam. It is done by creating a pointer in createFields.H that points to the selected turbulent closure. Then the function turbulence->divDevReff(U) is used to obtain the viscous and turbulent stresses. You can replicate this procedure in your solver. Check that other functions are used throughout the solver to, for example, solve the turbulent closure equations. You can take a look a this presentation for more information.

2- To add VOF take a look at the implementation of interFoam. You can check this thesis to see details of the implementation.

I hope this helps,
Federico
fedez91 is offline   Reply With Quote

Old   November 3, 2022, 15:24
Default
  #3
New Member
 
Shuo Mi
Join Date: Nov 2020
Location: London
Posts: 19
Rep Power: 5
Msure is on a distinguished road
thanks Federico, these documents are useful.
Msure is offline   Reply With Quote

Reply

Tags
openfoam, turbulence models, vof

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
Divergence detected in AMG solver. VOF. Mr.Mister Fluent Multiphase 4 September 25, 2023 07:10
OpenFOAM 5.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 11 June 5, 2018 23:48
Which solver in OpenFOAM corresponds to the Eulerian Model in FLUENT? paradism OpenFOAM 1 March 20, 2017 09:35
Help Selecting Turbulence Model for VOF Problem NavierIsStoked FLUENT 0 November 1, 2013 11:27
A Problem with setting the time step in VOF model Le FLUENT 2 July 20, 2006 22:00


All times are GMT -4. The time now is 14:45.