Quote:
|
Thanks for the suggestion, did not yet consider that option, but it sounds promising. I'll keep you updated once I find a solution.
|
reaction rate
Quote:
Is there any function in the new version of swak4foam to evoke reaction rate (combustion->R(Yi) in YEqn.H) of species? I need to write reaction rate of some soecies in a file. Thank you in advance for any hint Hossein |
Quote:
Just add "libswakChemistryModelFunctionPlugin.so" to the libs-entry in controlDict. Now if you use any swak-thing (function-object or also funkySetFields) that uses the Field-parser for the first time you see an output like this: Code:
Creating expression field muEff ... All this uses the results from the last run-through of the chemistry-solver. In funkySetFields you've got to trigger this calculation with the psiChem_updateChemistry-function (only use it once): "psiChem_updateChemistry(0.001)+psiChem_RR(CO)+psi Chem_RR(CO2)" for Reaction rates of CO and CO2. Of course you can use it to check whether the time-step influences the reaction rates "(psiChem_updateChemistry(0.001)+psiChem_RR(CO ))-(psiChem_updateChemistry(0.002)+psiChem_RR(CO))" but that of course calculates everything twice |
reaction rate(2)
Quote:
if (Y[i].name() == "O2") { volScalarField wO2 = psiChem_RR(Y[i].name()); wO2.write(); } I inserted the #include "swakPsiChemistryModelPluginFunction.H" header in my .C file and the address of it in "option" which is in following: EXE_INC = \ . . . -I$(HOME)/Swak4Foam_2.x_release_0.2.3/Libraries/swak4FoamParsers/lnInclude/ \ -I$(HOME)/Swak4Foam_2.x_release_0.2.3/Libraries/swakSourceFields/lnInclude/ \ -I$(HOME)/Swak4Foam_2.x_release_0.2.3/Libraries/functionPlugins/swakChemistryModelFunctionPlugin/lnInclude EXE_LIBS = \ . . . -lsampling \ -lmeshTools \ -L$(FOAM_USER_LIBBIN) \ -lswak4FoamParsers \ -lswakChemistryModelFunctionPlugin \ -lswakSourceFields How can I solve above problem? Best Regards, Hossein |
Quote:
- create an instance of FieldValueExpressionParser. Feed it the expression you want to get and get the result from that. I don't explain this in detail because for the purpose of what you want to do this would be like using dynamite to go after the cockroaches in your drain: lot of fun, but the neighbours might think it is a little bit excessive. - have a look at the source of the plugin and try to lift the parts you need (If I remember it correctly: get from the registry the object-registry the object with the name "thermophysicalProperties". Cast it down to the combustion-thermo and then call the RR there). That might be the easiest (for your purposes) |
reaction rate(3)
Quote:
Thanks again |
Quote:
|
Release 0.2.4
A new version of swak4Foam has been released. It is the version found on the USB-stick of the 8th OpenFOAM workshop. New features include (but for all see the README which has a complete list):
- functionObjects now store their data in the sub-directory postProcessing according to the new convention OpenFOAM has (sorry: this may break existing scripts relying on the old location) - slight change in the format written may break the restart of cases where swak-specific restart data was written with older swak-version (should not hit many people) - Example cases are adapted to run with OF 2.2. This may prohibit them from running with 2.1 or 2.0 But now the good parts: - build scripts have been adapted to run on more machines, allow tuning of the compilation process, compile on non-gcc compilers and give more information for finding problems - A new library with additional searchableSurfaces (to be used in snappyHexMesh) that allow boolean operations and coordinate transformations of searchable surfaces - Function objects to calculate the distributions of variables (and expressions) - specification of aliases for field names that contain special characters (like thermo:rho) - functionObject to list all registered objects (basically for finding out what is there) - functionObjects to handle global variables - functionObject that executes a list of other functionObjects only if the run is parallel/serial - A new type of variable (stacked) that allows recording multiple values - More flexible output control for functionObjects based on simpleFunctionObjects - swakDataEntry is improved - other stuff and bug fixes (check the README) Also to make life easier for the non-Emacs people who have problems converting the (still incomplete ) reference guide to a more readable form it can be downloaded here: http://openfoamwiki.net/images/d/db/...mReference.pdf |
OpenFOAM 2.2.1 + Swak4Foam 0.24 ?
Hi Bernhard,
Will swak4Foam 0.2.4 install correctly on the new OpenFOAM 2.2.1 ? Also, when will swak4Foam 0.2.4 be posted to the openfoamwiki.net site? Thank you very much. |
Quote:
Quote:
|
New Release of 0.3.0 of swak4Foam
8 months ago the last release of swak4Foam happened. A week later Edward Snowden blew the whistle on the NSA. Coincidence? Unlikely! (who is back there saying "Correlation does not imply causality"? Obviously someone who doesn't appreciate a good conspiracy theory). Today the next version of swak4Foam is announced and the world is expecting the next Spy-Agency to be exposed. The only question is: will it be China, Russia or Austria.
Most of the features have already leaked to the public through the public development repository and the twitter-acount @swakPyFoam but for all those whose intelligence-branch failed to interpret these informations correctly here is an incomplete list of the new features
For further information see - the Wiki page http://openfoamwiki.net/index.php/Contrib/swak4Foam - the README that comes with the sources - the Documentation-folder of the sources has an incomplete reference guide. It documents all the expression-grammars Have fun and look out for the men in the trenchcoats |
New Release of 0.3.1 of swak4Foam
This release has been sitting on my hard-disk for several weeks but now I've gotten around to releasing it officially (it is technically identical to the version on the USB-sticks distributed at the Workshop and also the version that is pulled when you compile it as one of the ThirdParty-packages with foam-extend-3.1)
This Release supports the latest versions of OpenFOAM (2.3) and Foam-Extend (3.1). It has its fair share of bug-fixes and also some new features:
|
Dear Bernhard,
How can I store the reaction rate of species O2 in each time step using psiChem_RR? Which expressions should be added to controlDict file after adding "libswakChemistryModelFunctionPlugin.so" in the libs or do something else? I'm using swak4Foam_2.x_release_0.2.3 now. Thank you in advance, Hossein |
Quote:
|
Quote:
That is what I need. Sorry for another question. For example If I set the deltaT value in controlDict to 1e-07, Does psichem_RR function consider that value to calculate the reaction rate? Thanks |
Quote:
|
Dear foamers,
I am trying to install swak4Foam on OF2.3, and I already tried the OF2.2x version suggested by Bruno but still there are some errors. I am wondering if there is a package developed for OF2.3. I am looking forward to your answers, Thanks in advance and Best, Mahdi |
Quote:
|
1 Attachment(s)
Quote:
Thanks a lot for your quick response as always. I tried the 2.x-release downloaded from: svn checkout svn://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_2.0/libraries/swak4Foam/ swak4Foam_2.x I attached the make log file output from this compile. Then I also tried this one which was suggested by Bruno (https://github.com/wyldckat/swak4foam/tree/OF22X), but I am not sure if this principally should work for me or not; anyway it did not :) Thanks and Best, Mahdi |
All times are GMT -4. The time now is 10:23. |