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

Adding line source term for scalar transport by fvOptions

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By wayne14
  • 2 Post By wayne14
  • 1 Post By AbdelkaderDZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2015, 05:29
Default Adding line source term for scalar transport by fvOptions
  #1
Member
 
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 41
Rep Power: 10
wayne14 is on a distinguished road
Hi,

I have been trying to add a line source on the ground for scalar transport by fvOptions. My idea is to approximate the line source by a narrow area source. So I extract a faceSet from the lowerWall (the ground boundary) as follows:

Code:
actions
(
    {
        name    f0; //http://openfoamwiki.net/index.php/TopoSet
        type    faceSet;
        action  new;
        source  patchToFace;
        sourceInfo
        {
            name lowerWall; 
        }
    }
    {
        name    f0;
        type    faceSet;  //2D
        action  subset;
        source  boxToFace;
        sourceInfo
        {
             boxes ((1.1076 0 0.4)(1.122 0 1.6)   (1.158 0 0.4)(1.1724 0 1.6));
        }
    }
);
And then I set the source strength in the fvOptions dictionary as follows:

Code:
scalarTracer //name
    {
        type            scalarSemiImplicitSource;
        active          true;
        selectionMode   all;  // all, cellSet, points, cellZone  
        cellSet       f0;//TSsourceCells; 
        
        scalarSemiImplicitSourceCoeffs
        {
            volumeMode      specific; // absolute <quantity>; specific <quantity>/m^3
            injectionRateSuSp 
            {
                TS      (0.2936 0); //kg/m^3/s  0.01/0.0340557 
            }
        }
    }
My code runs well, but there is some important thing that confuses me:
My total source strength is 0.01 kg/s, the area of f0 is 0.0340557 m^2. Is it right to set TS as 0.01/0.0340557 with the volumeMode being 'specific' ?

By the way, if there is better ideas for a line source term, please tell me too.

Thank you!
Wayne
SHANRU likes this.
wayne14 is offline   Reply With Quote

Old   November 9, 2015, 07:08
Default Re:Adding line source term for scalar transport by fvOptions
  #2
New Member
 
Korichi Abdelkader
Join Date: Jan 2013
Posts: 11
Rep Power: 13
AbdelkaderDZ is on a distinguished road
Dear wayne14,
I have the same problem, Have sresolved the your's? Please I need help
Kader
AbdelkaderDZ is offline   Reply With Quote

Old   November 9, 2015, 09:12
Default
  #3
Member
 
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 41
Rep Power: 10
wayne14 is on a distinguished road
Quote:
Originally Posted by AbdelkaderDZ View Post
Dear wayne14,
I have the same problem, Have sresolved the your's? Please I need help
Kader
Hi Korichi Abdelkader,

Yes, I have solved the problem.
But I need a little time to explain what I do, just let you know I will answer it.

Best wishes,
Yan Wang
wayne14 is offline   Reply With Quote

Old   November 9, 2015, 09:23
Default
  #4
Member
 
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 41
Rep Power: 10
wayne14 is on a distinguished road
The idea mentioned in my previous post is somewhat strange, the more comfortable way to implement a line source (or whatever shape) is to have a suitable mesh, which matches exactly (or approximately) with the shape of your source term.

Here I will give three steps for the problem:

1. Pay attention to the source shape when you generate the mesh. Make the mesh matches with your source term.
2. Use topoSetDict to 'mark' all the cells the belong to your source term. Here is what I do:
Code:
actions
(

    {
        name    f0;
        type    cellSet;  
        action  new;
        source  boxToCell;
        sourceInfo
        {
          box (0.29286 -0.06 0)(0.30714 -0.057 0.03);
        }
    }
   {
        name    f0;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set f0;           // name of the cellSet
        }
    }
);
3. Use fvOptions to set the intensity of your source term, like the following:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    scalarTracer //name
    {
        type            scalarSemiImplicitSource;
        active          true;
        selectionMode   cellZone;  // all, cellSet, points, cellZone 
        cellZone       f0;//sourceCells; 
        
        scalarSemiImplicitSourceCoeffs
        {
            volumeMode      absolute; // absolute <quantity>; specific <quantity>/m^3
            injectionRateSuSp 
            {
                TS      (10 0); //kg/s  
            }
        }
    }
Hope it helpful,

Regards,
Yan Wang
arsenis and hhu_lulu like this.
wayne14 is offline   Reply With Quote

Old   November 9, 2015, 10:03
Default Re:Adding line source term for scalar transport by fvOptions
  #5
New Member
 
Korichi Abdelkader
Join Date: Jan 2013
Posts: 11
Rep Power: 13
AbdelkaderDZ is on a distinguished road
Thank you Yan,
I will try it.
Kader
AbdelkaderDZ is offline   Reply With Quote

Old   November 9, 2015, 10:47
Default Re:Adding line source term for scalar transport by fvOptions
  #6
New Member
 
Korichi Abdelkader
Join Date: Jan 2013
Posts: 11
Rep Power: 13
AbdelkaderDZ is on a distinguished road
Hi Yan,
I have tried, I have error when excuting topset, I have 0 point new.
Thanks
AbdelkaderDZ is offline   Reply With Quote

Old   November 9, 2015, 20:27
Default
  #7
Member
 
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 41
Rep Power: 10
wayne14 is on a distinguished road
Quote:
Originally Posted by AbdelkaderDZ View Post
Hi Yan,
I have tried, I have error when excuting topset, I have 0 point new.
Thanks
Hi Kader,

Hope I am not having your name wrong.

When using topoSet, It's very important to make sure that the sourceInfo has been specified correctly.

For the below example, the centroid of all the cells belonging to the source term are within the 'box' region specified by vertex coordinates. Otherwise, no new cellZone will be generated.

Code:
  sourceInfo
        {
          box (0.29286 -0.06 0)(0.30714 -0.057 0.03);
        }
By the way, posting your error information may be helpful

Regards,
Yan Wang
wayne14 is offline   Reply With Quote

Old   November 17, 2015, 09:28
Default Re:Adding line source term for scalar transport by fvOptions
  #8
New Member
 
Korichi Abdelkader
Join Date: Jan 2013
Posts: 11
Rep Power: 13
AbdelkaderDZ is on a distinguished road
It works, thank you
wayne14 likes this.
AbdelkaderDZ is offline   Reply With Quote

Old   June 25, 2019, 10:33
Default
  #9
Senior Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 12
hiuluom is on a distinguished road
Quote:
Originally Posted by wayne14 View Post
Code:
 TS      (10 0); //kg/s
I would like to ask does the scalar transport have unit kg/s?
hiuluom is offline   Reply With Quote

Reply

Tags
fvoptions, scalar transport, source terms


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
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 10:59
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 04:26


All times are GMT -4. The time now is 13:10.