|
[Sponsors] |
Using fvModels for tracer injection in simpleFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 18, 2021, 09:55 |
Using fvModels for tracer injection in simpleFoam
|
#1 |
New Member
Luckmore Kadzungura
Join Date: Jul 2021
Posts: 12
Rep Power: 5 |
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. |
|
August 27, 2021, 18:18 |
Also having issues with fvModels
|
#2 |
New Member
George
Join Date: Oct 2020
Posts: 24
Rep Power: 6 |
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]; }; } #}; } |
|
August 27, 2021, 20:53 |
|
#3 |
New Member
Luckmore Kadzungura
Join Date: Jul 2021
Posts: 12
Rep Power: 5 |
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. |
|
|
|
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 |