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

Transport Equation in InterFoam using MULES

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 1, 2017, 16:41
Default Transport Equation in InterFoam using MULES
  #1
TCS
New Member
 
Thomas C. Sykes
Join Date: Jul 2017
Location: University of Leeds, UK
Posts: 11
Rep Power: 8
TCS is on a distinguished road
Hi All,

OpenFOAM 4.1

I am adding a scalar transport equation to the InterFOAM solver
$\frac{\partial c}{\partial t} + \nabla\cdot(c{\bf u})$
to track the progress of a scalar concentration field (c) which I define in setFields to be 0,1,2 initially in certain locations.

I have successfully added a standard equation in the InterFoam.C file:
Code:
fvScalarMatrix CEqn
        (
              fvm::ddt(c)
            + fvm::div(phi, c)
        );

CEqn.solve();
However, this is affected by a large amount of numerical diffusion.

I understand I need to use the MULES FCT scheme to try and solve this, as noted in Using MULES to solve transport equation with sharp interface but am unsure of how to do this.

I've tried adding the following to the alphaEqn file:
Code:
        tmp<surfaceScalarField> phiCure
        (
            fvc::flux
            (
                phi,
                c,
                alphaScheme
            )
          + fvc::flux
            (
               -fvc::flux(-phir, alpha2, alpharScheme),
                c,
                alpharScheme
            )
        );
together with
Code:
MULES::explicitSolve(c, phiCN, phiCure, 2, 0);
but this does not compile with wmake:
error: no matching function for call to ‘explicitSolve(Foam::volScalarField&, Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> >&, Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> >&, int, int)’
among many errors.

Any help appreciated! Cheers.
TCS is offline   Reply With Quote

Old   August 7, 2017, 16:18
Default
  #2
TCS
New Member
 
Thomas C. Sykes
Join Date: Jul 2017
Location: University of Leeds, UK
Posts: 11
Rep Power: 8
TCS is on a distinguished road
Any help appreciated.
TCS is offline   Reply With Quote

Old   August 7, 2017, 18:48
Default
  #3
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
If you just advect a passive scalar without particular condition at the interfaces, why not just solve C from alpha? In your case you just have C=alpha.

Cheers,
Cyp is offline   Reply With Quote

Old   August 10, 2017, 22:12
Default
  #4
TCS
New Member
 
Thomas C. Sykes
Join Date: Jul 2017
Location: University of Leeds, UK
Posts: 11
Rep Power: 8
TCS is on a distinguished road
Quote:
Originally Posted by Cyp View Post
If you just advect a passive scalar without particular condition at the interfaces, why not just solve C from alpha? In your case you just have C=alpha.

Cheers,
Hi, I've got there regions (2 droplets coalescing) of flaid. Two have the same alpha value and the issue is I need to know where one droplet is going when it coalescea with the other. So alpha gets me the outline of the two droplets together but not of each separately if you see what I mean. Because the two droplets are (currently) the same fluid. Thanks for the suggestion though
TCS is offline   Reply With Quote

Old   August 15, 2017, 23:08
Default
  #5
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
When two droplets coalesce they become one... I am not sure your problem is well posed.
Cyp is offline   Reply With Quote

Old   March 20, 2018, 11:57
Default
  #6
New Member
 
Marius Bünker
Join Date: Oct 2017
Posts: 13
Rep Power: 8
Blumenkind is on a distinguished road
I am stuck with a similar problem. Have you gotten any further?

Edit: Not a similar problem though. You were trying to compile two int, when the compiler wanted to see fields...
Blumenkind is offline   Reply With Quote

Reply

Tags
interfoam, mules, programming, transport equation


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
Setting the height of the stream in the free channel kevinmccartin CFX 12 October 13, 2022 21:43
Solving Transport equation for additional variable using CFX creddy_trddc CFX 11 April 2, 2015 21:07
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
Turbulent Heat Transfer Transport Equation Flo.duck Main CFD Forum 0 May 6, 2009 03:37
Poisson equation combined with transport equation Se-Hee CFX 0 December 27, 2007 01:00


All times are GMT -4. The time now is 23:07.