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

Using fvOption for adding momentum in pimpleFoam(changes in pimpleFoam example)

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By mAlletto

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 20, 2020, 12:53
Default Using fvOption for adding momentum in pimpleFoam(changes in pimpleFoam example)
  #1
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 204
Rep Power: 7
farzadmech is on a distinguished road
Dear friends
I have changed pitzdaily example(pimpleFoam solver), and I want to add momentum source to that.
I use the topoSetDict as below to create the desired zone;
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    "system";
    object      topoSetDict.1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

actions
(

    {
        name    farzaaadSulzerCellSet;
        type    cellSet;
        action  new;     //remove;  // new;
        source  boxToCell;

        sourceInfo
        {
            box (0.096 0.10 0.0357) (0.404 0.20 0.0643);
        }
    }
    
      {
        name    farzaaadSulzer;
        type    cellZoneSet;
        action  new; // remove; // new;
        source  setToCellZone;
        sourceInfo
        {
            set farzaaadSulzerCellSet;
        }
    } 
    
    
    
);

// ************************************************************************* //
and I used fvOption as below;

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

momentumSource
{

    type            meanVelocityForce;

    active          on;            //on/off switch

    //cellSet       sourceSet;

 

    meanVelocityForceCoeffs

    {
      timeStart   0.;
      duration    1000.;

        selectionMode   cellZone;        //cellSet;       //cellZone;
        cellZone         farzaaadSulzer;  //cellZone        farzadSulzer; 

        fields                  (Uc);

        Ubar            ( 5.0 0.0 0.0);               // ( 0. -1.0 0.);

        relaxation  1.0;

    }

}

What I am doing wrong in my simulation(momentum source did not do anything)? I have attached the figure of my domain and also the momentum source inside it to this post.


Thanks,
Farzad
Attached Images
File Type: jpg photo_2020-10-20_17-48-29.jpg (105.7 KB, 26 views)
farzadmech is offline   Reply With Quote

Old   October 20, 2020, 16:25
Default incompressible/pimpleFoam/LES/channel395/
  #2
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 204
Rep Power: 7
farzadmech is on a distinguished road
in the "incompressible/pimpleFoam/LES/channel395/", we have;

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

momentumSource
{
    type            meanVelocityForce;

    selectionMode   all;

    fields          (U);
    Ubar            (0.1335 0 0);
}


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

But why it does not work in my pimpleFoam example?


Farzad
farzadmech is offline   Reply With Quote

Old   October 22, 2020, 05:41
Default
  #3
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
any special reason you wrote fields
Code:
 fields (Uc);
There are no fields Uc you solve for as far I know in OpenFoam
Tibo99 and Mahmoud Abbaszadeh like this.
mAlletto is offline   Reply With Quote

Reply


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
Using fvOption for adding momentum farzadmech OpenFOAM Programming & Development 11 October 20, 2020 12:55
Table bounds warnings at: END OF TIME STEP CFXer CFX 4 July 16, 2020 23:44
Question about adaptive timestepping Guille1811 CFX 25 November 12, 2017 17:38
Spray total droplet momentum calculation help tarnsharma AVL FIRE 0 July 19, 2012 08:17
Derivation of Momentum Equation in Integral Form Demonwolf Main CFD Forum 2 October 29, 2009 19:53


All times are GMT -4. The time now is 03:18.