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

fvOptions with twoPhaseEulerFoam: momentumSource

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By avila.vc

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 16, 2016, 11:26
Default fvOptions with twoPhaseEulerFoam: momentumSource
  #1
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Hello everyody,

I'm trying to run a case with cyclic boundary conditions for a two-fluid problem.

I need so to set a driving force inside the domain and for what I know I should do that using fvOptions.

I have few questions:

OF 3.0.1


Code:
momentumSource
{
    type            meanVelocityForce;
    active          yes;

    meanVelocityForceCoeffs
    {
        selectionMode   all;

        fieldNames      (U);
        Ubar            (0 5 0);
    }
}
  • can I use it with twoPhaseEulerFoam?
  • in fieldnames should I put U.air/U.particles (as from constant/phaseProperties) or U1/U2 as from the UEqns.H in the solver sources?
  • should I define a momentum source for both phases?
  • how do I understand if fvOptions settings have been received correctly from the solver? In the log I have
    Code:
    Creating finite volume options from "constant/fvOptions"
    
    Selecting finite volume options model type meanVelocityForce
        Source: momentumSource
        - selecting all cells
        - selected 450000 cell(s) with volume 0.00010598
        Initial pressure gradient = 0
    whatever fieldNames I put.
Thanks for your help,
rdbisme is offline   Reply With Quote

Old   March 19, 2016, 16:51
Default Hi
  #2
Member
 
Vinícius da Costa Ávila
Join Date: Jul 2015
Location: Porto Alegre, Brazil
Posts: 62
Rep Power: 11
avila.vc is on a distinguished road
Hi Ruben! How are you?

So, regarding your questions:

I use scalarSemiImplicitSource to set a velocity field source with twoPhaseEulerFoam (OF 30x), but I had a brief look at meanVelocityForce code source (src/fvOptions) and based on that, I think:

can I use it with twoPhaseEulerFoam? yes

in fieldnames should I put U.air/U.particles (as from constant/phaseProperties) or U1/U2 as from the UEqns.H in the solver sources? only (U.air) or (U.particles)

should I define a momentum source for both phases? if you want, you can, according to the source code. I think you should try defining one momentum source for EACH phase, separately.

how do I understand if fvOptions settings have been received correctly from the solver? In the log I have.
this one is a bit tricky for me. You may run test cases (with/without the source and with different force values) to analise the results and see if they seem consistent (I think there may be a simpler way, but I cant think of none in the moment)

I hope I have helped you a bit.

Best regards,
doubledang likes this.
__________________
Vinícius dC.A.
avila.vc is offline   Reply With Quote

Old   March 21, 2016, 06:39
Default
  #3
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by avila.vc View Post
Hi Ruben! How are you?

So, regarding your questions:

I use scalarSemiImplicitSource to set a velocity field source with twoPhaseEulerFoam (OF 30x), but I had a brief look at meanVelocityForce code source (src/fvOptions) and based on that, I think:

can I use it with twoPhaseEulerFoam? yes

in fieldnames should I put U.air/U.particles (as from constant/phaseProperties) or U1/U2 as from the UEqns.H in the solver sources? only (U.air) or (U.particles)

should I define a momentum source for both phases? if you want, you can, according to the source code. I think you should try defining one momentum source for EACH phase, separately.

how do I understand if fvOptions settings have been received correctly from the solver? In the log I have.
this one is a bit tricky for me. You may run test cases (with/without the source and with different force values) to analise the results and see if they seem consistent (I think there may be a simpler way, but I cant think of none in the moment)

I hope I have helped you a bit.

Best regards,
Thanks vinicius for your kind help. I managed to run the simulation as you suggested (even if I'm not sure it's working as expected). I will still keep checking on that.

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

momentumSource
{
    type            meanVelocityForce;
    active          yes;

    meanVelocityForceCoeffs
    {
        selectionMode   all;

        fieldNames      (U.air);
        Ubar            (0 1 0);
    }
}

momentumSource1
{
    type            meanVelocityForce;
    active          yes;

    meanVelocityForceCoeffs
    {
        selectionMode   all;

        fieldNames      (U.water);
        Ubar            (0 1 0);
    }
}



// ************************************************************************* //
rdbisme is offline   Reply With Quote

Reply

Tags
fvoptions, twophaseeulerfoam


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
Can I use fvOptions to couple a solid region and a fluid region? titanchao OpenFOAM Running, Solving & CFD 4 January 14, 2022 08:55
Using Porous Media on twoPhaseEulerFoam avila.vc OpenFOAM Running, Solving & CFD 4 March 14, 2018 09:09
twoPhaseEulerFoam fvOptions for alpha lavdwall OpenFOAM Running, Solving & CFD 8 October 19, 2015 10:57
Is twoPhaseEulerFoam applicable to 3D cases / delivering erroneous results? ThomasV OpenFOAM 0 November 11, 2013 09:10
twoPhaseEulerFoam freemankofi OpenFOAM 0 May 23, 2011 17:24


All times are GMT -4. The time now is 06:37.