Adding linear generation in InterFOAM
Hello everybody,
I am trying to do something which is probably trivial but I don't find the proper formulation. I have managed to add a tracer in my InterFOAM simulation by adding a jump condition as per this thread. Now I just want to overcome the lack of chemical reactions in the modified solver by adding a simple parameter. I can calculate an approximate generation term knowing the daily performance of my reactor (it is a bioreactor so it is really slow) and I can add it as follow (the K parameter): Let's say I have algae growing on CO2 and I want to see how its concentration decreases along the X axis only (linear reactor with negligible culture depth solved in 2D neglecting the y direction). How do I specify not to solve the along the z axis??? I am quite sure it's a really easy task but I don't know even what to look for. Thank you everybody for your help Luca |
Quote:
|
Akidess, thanks for the quick reply.
Of course what you wrote is right but I don't know how to translate it in viable code. The equation I wrote in my post above is now (before additions): Code:
fvm::ddt(C) Code:
fvm::ddt(C) Thank you. |
Your code does not match your equation. You completely dropped grad(K)?
Code:
fvm::ddt(C) |
Quote:
Thank you very much for your help in the proper formulation too! I will add it in the code and post the results even though I suppose it will work right out of the box. Thank you for your kind help! |
Quote:
|
Okey dokey!
Actually I thought it was right that way.... why would you use different notations for the same vector in different part of OF (ie the source files and the boundary conditions)? Will place also the commas then! |
In C++ you don't really have a choice - the compiler won't treat the whitespace as delimiter for the arguments (as it does with commas). Why the makers of OpenFOAM decided to go with a different syntax in the case files only they know ;)
|
It works like a charm!!
Thank you for the hints and help :D Luca |
All times are GMT -4. The time now is 10:05. |