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

fvOptions SemiImplicitSource - scalarSemiImplicitSourceCoeffs

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By arsenis

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 3, 2019, 18:30
Default fvOptions SemiImplicitSource - scalarSemiImplicitSourceCoeffs
  #1
New Member
 
Join Date: Sep 2015
Posts: 13
Rep Power: 10
ChrisHa is on a distinguished road
Hi all,


I'm still new to OpenFOAM and I'm just learning to find my way by digging through the user guide, the tutorials, CFD Online and google.
I want to run the scalarTransport function 'attached' to a pimpleFoam run (OpenFOAM-v1812).

I want to 'simulate' a constant scalar source from a predefined source area (in 1/s per m2 of the source area) of one of my patches.
After some hours spent, I'm rather confused and need help/reassurance.

I see that there are quite a few tutorials using the function scalarSemiImplicitSource, however I can only find the file SemiImplicitSource.H? Further, the documentation I found so far is rather sparse. So far I prepared a scalarTransport function containing the following fvOptions, more or less copied from one of the tutorials:
Code:
...

fvOptions       
    {
       S-01
       {
       type            scalarExplicitSetValue;
       active          true;

       scalarSemiImplicitSourceCoeffs
           {
               selectionMode   cellZone;
               cellZone        SourceArea;
               volumeMode      absolute; // specific
               
               injectionRateSuSp
               {
                   Tracer   (1 0);
               }
           }
       }
    };
If I set volumeMode to absolute, does that mean that my entire cellZone fills with 1 unit of my Tracer per second?
So, if I want to simulate a source area of 1 unit/m2/s I just have to define all cells adjacent to the source area and I'm fine with the above settings?

Or how could I define my source area?
ChrisHa is offline   Reply With Quote

Old   March 5, 2019, 03:57
Default
  #2
New Member
 
Join Date: Sep 2015
Posts: 13
Rep Power: 10
ChrisHa is on a distinguished road
After thinking more about it, I guess, IF I have a regular grid adjacent to my source area, I can define my InjectionRate Su as 1/SourceArea, but as soon as I have irregular face areas 'connecting' to my source, this does no longer hold. But this is just my guessing.
If my above guessing was true, would it be possible to set Su to 0 and define an Sp term of the source to depend on the face area through which my tracer is injected (i.e. the face that 'connects' to my source area)?
ChrisHa is offline   Reply With Quote

Old   March 5, 2019, 13:13
Default
  #3
New Member
 
Arsenis Chatzimichailidis
Join Date: Oct 2014
Posts: 6
Rep Power: 11
arsenis is on a distinguished road
Hi Chris!

I am not really sure about the part with the "1 unit/m2/s", I'd rather think of it as unit/m3/s. (except the case you run 2D simulation, so I don't know!)

I think that the "absolute" option is best most of the times, as you submit the emission rate inside the computational domain.


You DON'T REALLY NEED this part, BUT:
To be absolutely sure about the emitted value, you can run the simulation with cyclic boundaries (a fully-closed domain).
In the case of "open" boundaries, run it for 1 second or 2, if you are positive that the emitted values will not arrive at the exit boundary and be purged outside of the domain.
Then, you could take an integral of the emitted value all over the domain in paraview. The result should be the (emission rate)*(seconds) with a pretty good accuracy.
arsenis is offline   Reply With Quote

Old   March 5, 2019, 21:05
Default
  #4
New Member
 
Join Date: Sep 2015
Posts: 13
Rep Power: 10
ChrisHa is on a distinguished road
Hi Arsensis,


Thank you for your answer!


I'm running a 3D case, where I want to simulate a diffusive source of a tracer emitted from a source area (on a wall patch, e.g. a certain area on the bottom/ground of the atmosphere) with a given total, constant flux from this area (say 1 per sec or equivalent, 1/A per sec per m2, where A stands for the total area in m2 of the source).


My idea was that if my cells adjacent to the source area have a rather small extension normal to the wall, I can approximate my diffusive source (acting like a constant flux BC for the scalar (Tracer)) by adding a source term to all these cells adjacent to the source area. However, I'm not sure how I should define this source term. E.g. if I choose the option 'absolute' with injection rate 1 (1/s) as in the above example, do I get 1 unit per each cell? Or 1 unit per CellZone, i.e. evenly distributed across all CellZone cells? Are there better ways for my diffusive source attempt?



Thanks,
Chris
ChrisHa is offline   Reply With Quote

Old   March 6, 2019, 04:24
Default
  #5
New Member
 
Arsenis Chatzimichailidis
Join Date: Oct 2014
Posts: 6
Rep Power: 11
arsenis is on a distinguished road
Hi Chris!

I am sorry that my english were confusing, I am not a native speaker!

I agree with you, that the volume source is essentially an area source, because the normal height of the source cells is not important compared to the other two source dimensions.

As far as the option "absolute", it assigns a SINGLE emission rate to the WHOLE source, either if the source consists of 2 cells or 1000 cells, etc. Thus, you get to choose the emission rate, without worrying if your source is e.g. 1.455 or 1.457 m3, because it will apply to the whole source.
ChrisHa, altinel and SHANRU like this.

Last edited by arsenis; March 6, 2019 at 04:35. Reason: improving the english
arsenis is offline   Reply With Quote

Reply

Tags
fvoptions, scalartransport, semi-implicit-source


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 07:55
fvMatrix, fvOptions and SuSp: automatic implicit/explicit source-term treatment Zeppo OpenFOAM Programming & Development 7 December 15, 2021 10:20
topoSet/setSet and fvOptions pod OpenFOAM Running, Solving & CFD 5 April 30, 2019 05:41
New output variable for source term in fvoptions - without changing the solver vincent.clary OpenFOAM Programming & Development 2 June 26, 2018 05:21
twoPhaseEulerFoam fvOptions for alpha lavdwall OpenFOAM Running, Solving & CFD 8 October 19, 2015 09:57


All times are GMT -4. The time now is 22:29.