CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Using fvModels for tracer injection in simpleFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 18, 2021, 09:55
Default Using fvModels for tracer injection in simpleFoam
  #1
New Member
 
Luckmore Kadzungura
Join Date: Jul 2021
Posts: 12
Rep Power: 5
Lucky is on a distinguished road
Hie Foamers


I am trying to inject a tracer inside a cylindrical geometry. i created cellzones using topoSet, i need to do a pulse injection. i set my fvModels file as best as i could and ran the simulation. its running well but i am not getting T values in post processing. my log file is saying



--> FOAM Warning :
From function void Foam::fvModels::checkApplied() const
in file cfdTools/general/fvModels/fvModels.C at line 124
Model Tracer defined for field injectionRateSuSp but never used


this message is on every time step.



i have attached my fvModels file with the code. please help.
Attached Files
File Type: txt fvModelscfd.txt (1.4 KB, 31 views)
Lucky is offline   Reply With Quote

Old   August 27, 2021, 18:18
Default Also having issues with fvModels
  #2
New Member
 
George
Join Date: Oct 2020
Posts: 24
Rep Power: 6
Dicanic is on a distinguished road
I am trying out the new OpenFOAM 9 and I am having the exact same error. While my source is a very complicated coded source I am using a very simple code to test if it is working at all, I used to use scalarCodedSource in OF8. The below is my new fvModels file which does not seem to be working, and I have tried a few variations of it to no avail. Let me know if you find a solution to this error and if I figure it out I will let you know as well (although I might have a very simple error and yours might be different).





Code:
codedSource
{
        type                coded;
        selectionMode       all;
        active                  true;
        name               sourceTime;
        field            energy;
    
        codeAddSup
    #{
        const Time& time = mesh().time()
            const scalarField& V = mesh_.V();
            scalarField& eSource = eqn.source();
            const scalarField& cellx = mesh_.C().component(0);
            
            const scalar startTime = 0.0;
            
            if (time.value() > startTime)
        {        
            forAll(cellx, i)
            {
                // cell volume specific source
                   heSource[i] += 1e5*V[i];
                };
                }
    #};
        
}
Thanks
Dicanic is offline   Reply With Quote

Old   August 27, 2021, 20:53
Default
  #3
New Member
 
Luckmore Kadzungura
Join Date: Jul 2021
Posts: 12
Rep Power: 5
Lucky is on a distinguished road
Hie Dicanic


Yes i managed to solve my problem. I am not sure if your problem involves scalarTransport as well. However, to my problem, I created a new solver which I named scalarTransportSimpleFoam and compiled it. There is a lot of posted material on how to create a new solver from the existing ones on youtube. The new solver then required the T file in the 0 folder for boundary conditions. I set a T file with tracer boundary conditions, there was nothing injected at any of the patches in that file because my pulse was going to be injected on cells zones as specified in the fvModels file.


To my knowledge, the error was due to the fact that simpleFoam solver does not have the scalarTransport T field in its createFields directory, so by integrating the scalarTransport solver to the simpleFoam solver, I added that field hence the need to have the T file in the folder 0.



I then debugged my fvModels code errors and it worked perfectly. You can check my fvModels file how i set it up. I am assuming your topoSetDict is all good.
Attached Files
File Type: zip fvModelsf.zip (867 Bytes, 38 views)
Lucky 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
Injection injection-0: LOST 2 out of 20 injection locations attaullah FLUENT 17 March 2, 2023 11:31
interFoam vs. simpleFoam channel flow comparison DanM OpenFOAM Running, Solving & CFD 12 January 31, 2020 16:26
file injection.: continuity fail; volume injection.: wrong total mass blerli_91 Fluent Multiphase 6 October 2, 2018 06:34
simpleFoam parallel solver & Fluent polyhedral mesh Zlatko OpenFOAM Running, Solving & CFD 3 September 26, 2014 07:53
injection problem Mark New FLUENT 0 August 4, 2013 02:30


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