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

Calculate the mixing time using a tracer

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 10, 2012, 23:19
Default Calculate the mixing time using a tracer
  #1
Member
 
Luca Giannelli
Join Date: Jun 2010
Location: Kobe, Japan
Posts: 58
Rep Power: 7
voingiappone is on a distinguished road
Hello everybody,

as per title, I would like to calculate the mixing time of the reactor I am simulating using interfoam (a bubble column). I will surely do that using a tracer in the reactor but would like to simulate it as I have found papers where they're doing such analysis. Unfortunately they're not using OpenFOAM as the solver.

The idea is really simple:

- you define a probing spot (somewhere inside the domain)
- inject a tracer (maybe defining a concentration? Or a fixed quantity?)
- run the simulation and record the step-by-step time variation of the tracer concentration in the probe.
- go for a coffee while the trinket kindly works out the solution.
- plot the results

Looks easy but, I've been looking for an answer to this question for some time and I was not able to figure out how to do it! I start think I have to add the concentration component in the solver equation...

Any idea?

Thanks!
voingiappone is offline   Reply With Quote

Old   December 11, 2012, 04:19
Default
  #2
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 235
Rep Power: 9
olivierG is on a distinguished road
Hello,

You could to that with a tracer, or do a full residence time distribution (RTD).
And yes, you should add a passive scalar to interFoam (take a look at http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam

regards,
olivier
olivierG is offline   Reply With Quote

Old   December 11, 2012, 10:52
Default
  #3
Member
 
Luca Giannelli
Join Date: Jun 2010
Location: Kobe, Japan
Posts: 58
Rep Power: 7
voingiappone is on a distinguished road
Quote:
Originally Posted by olivierG View Post
Hello,

You could to that with a tracer, or do a full residence time distribution (RTD).
And yes, you should add a passive scalar to interFoam (take a look at http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam

regards,
olivier
Olivier,

thank you for the swift response and for pointing me to that wiki page. As i was looking for the mixing time (not for the residence time) i was getting 0 results! keywords....

I was also starting to suspect the need for an added variable (that is what happens in the real situation) but I dare to hope there was a quicker way to do that.

I'll go the rough way then... and report if I succeed. But that will be tomorrow.

Thanks again.
voingiappone is offline   Reply With Quote

Old   December 12, 2012, 01:54
Default
  #4
Member
 
Luca Giannelli
Join Date: Jun 2010
Location: Kobe, Japan
Posts: 58
Rep Power: 7
voingiappone is on a distinguished road
Ok,

I am a step forward in the solution of my problem but still a step before that!
I clarify what I mean:

- read thoroughly the Wiki page and followed the step-by-step guide
- compiled and run the modified file flawlessly (as a test for the future duty)
- moved the interFoam files to my folder ad run the test "wmake" (before any modification) and I got this wonderful output:

Code:
Making dependency list for source file tracer_interFoam.C
SOURCE=tracer_interFoam.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I/home/piota/OpenFOAM/OpenFOAM-1.6/src/transportModels -I/home/piota/OpenFOAM/OpenFOAM-1.6/src/transportModels/incompressible/lnInclude -I/home/piota/OpenFOAM/OpenFOAM-1.6/src/transportModels/interfaceProperties/lnInclude -I/home/piota/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels/incompressible/turbulenceModel -I/home/piota/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/piota/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/piota/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/tracer_interFoam.o
/home/piota/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H: In function ‘int main(int, char**)’:
/home/piota/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:11:10: warning: unused variable ‘transonic’ [-Wunused-variable]
/home/piota/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:14:9: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
/home/piota/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:3:9: warning: unused variable ‘nCorr’ [-Wunused-variable]
/home/piota/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:8:10: warning: unused variable ‘momentumPredictor’ [-Wunused-variable]
/home/piota/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:11:10: warning: unused variable ‘transonic’ [-Wunused-variable]
/home/piota/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:14:9: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I/home/piota/OpenFOAM/OpenFOAM-1.6/src/transportModels -I/home/piota/OpenFOAM/OpenFOAM-1.6/src/transportModels/incompressible/lnInclude -I/home/piota/OpenFOAM/OpenFOAM-1.6/src/transportModels/interfaceProperties/lnInclude -I/home/piota/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels/incompressible/turbulenceModel -I/home/piota/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/piota/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/piota/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude   -fPIC Make/linux64GccDPOpt/tracer_interFoam.o -L/home/piota/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt \
	     -linterfaceProperties -lincompressibleTransportModels -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -lOpenFOAM -liberty -ldl /home/piota/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/openmpi-1.3.3/libPstream.so   -lm -o /home/piota/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/tracer_interFoam
Make/linux64GccDPOpt/tracer_interFoam.o: In function `main':
tracer_interFoam.C:(.text.startup+0xe77): undefined reference to `Foam::incompressible::turbulenceModel::New(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&)'
collect2: ld returned 1 exit status
make: *** [/home/piota/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/tracer_interFoam] Error 1
I am no expert in compilation but I guess there's something wrong in the declaration of functions.
I suppose I can ignore the "unused variable" errors.... so, probably the error is located in the very last step:

Code:
Make/linux64GccDPOpt/tracer_interFoam.o: In function `main':
tracer_interFoam.C:(.text.startup+0xe77): undefined reference to `Foam::incompressible::turbulenceModel::New(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&)'
collect2: ld returned 1 exit status
make: *** [/home/piota/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/tracer_interFoam] Error 1
I tried to go through all the dep files (which are A LOT) looking for those keywords it reports in the error (i.e. fvPatchField, volMesh etc etc) but I were not able to get any solution.

I don't actually know why every time I get to compile something in OpenFOAM it takes me one week of fiddling.....

As I just need to add the scalar (and I know how to do that now) I am a step from the solution! Any suggestion is strongly appreciated.
voingiappone is offline   Reply With Quote

Old   December 12, 2012, 11:03
Default
  #5
Member
 
Luca Giannelli
Join Date: Jun 2010
Location: Kobe, Japan
Posts: 58
Rep Power: 7
voingiappone is on a distinguished road
Solved the problem for now....

Modified interFoam compilation fails

and the tracer system seems to be perfect for my needs! I'll update info here if I will have some problems
voingiappone is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with FloatingObject Leech OpenFOAM Running, Solving & CFD 10 March 29, 2012 15:24
how to obtain time averaged data in Fluent when using SM to simulate mixing tank ziyan7 FLUENT 4 February 14, 2012 03:08
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 9 January 3, 2012 09:06
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 12 September 17, 2007 17:48


All times are GMT -4. The time now is 01:17.