|
[Sponsors] |
October 15, 2010, 05:48 |
|
#61 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
October 15, 2010, 06:56 |
|
#62 |
Senior Member
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17 |
Hello Nir,
you can install the packages anywhere where you have write permission. So the Thirdparty dictionary is not a bad idea. Usually you indicate this during the configuring process with the preface-option. Have a look at the Sundials installation procedure indicated in the Wiki. Often it is easiest to install as much as possible through you package manager (yast for linux, aptget for debian). Markus |
|
October 15, 2010, 11:25 |
|
#63 |
Senior Member
Join Date: Dec 2009
Posts: 112
Rep Power: 16 |
Hey Guys,
thx for your answers! I was pretty sure that it would work in /opt as well. I stuck pretty much to the manual (defining $CANTERA_HOME ...) except for the location /opt/cantera-1.8 . So after typing make the system was screwed. So I reinstalled and cp-ed from backup i had taken after it was screwed up. I wanted to install cantera in another place, but bevore moving it out of opt i had the great idea to "sudo make uninstall" to clean up.... Guess what...system was screwed again! I am pretty sure that it was cantera...and not a coincident.. If you doubt, give it a try !! Have a nice weekend! Best! |
|
October 18, 2010, 10:11 |
|
#64 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
But at least you admit that you compiled/installed/uninstalled as root (or sudo)? Then it would have been an overzealous script/Makefile That is one of the reasons why when compiling/installing software yourself you should do it as a separate non-privileged user that may only write to the directory where you want to install your software. That way he can't mess up the system. On the other hand normal users can't mess up the installation Bernhard |
||
October 21, 2010, 09:19 |
thermopysical properties of CANTERA
|
#65 |
Member
Join Date: May 2009
Posts: 32
Rep Power: 17 |
Hi,
while running alternatereactingFoam on the dualInlet case I get Reading from Cantera-File "/home/tegner/OpenFOAM/tegner-1.5.x/run/AlternateChemistry/Transient/dualInlet/constant/mix.cti" the mixture mix --> FOAM Warning : From function canteraMixture::canteraMixture in file canteraMixture.C at line 70 The thermophysical properties of CANTERA are currently not converted to OpenFOAM. Instead the properties from "OpenFOAM/user-1.5.x/run/AlternateChemistry/Transient/dualInlet/constant/gasThermo" are used I have seen this asked before, but I couldn't find an answer. Is this due to an error on my part? Thanks! |
|
October 21, 2010, 13:43 |
|
#66 | |
New Member
Silvano
Join Date: Aug 2010
Location: Chicago /Torino Us/Italy
Posts: 11
Rep Power: 16 |
Quote:
Check the first page of this forum the post by markus on October 21, 2009. :-P Silvano |
||
October 22, 2010, 05:58 |
Stupid me.
|
#67 |
Member
Join Date: May 2009
Posts: 32
Rep Power: 17 |
Thanks a lot!
|
|
October 22, 2010, 12:17 |
|
#68 |
Member
N. A.
Join Date: May 2010
Posts: 64
Rep Power: 16 |
Hi Bernhard,
Can you recommend what can be done to modify the package to make it work with OpenFOAM 1.6 version. Thanks, Nir |
|
November 16, 2010, 05:50 |
Copy of massfractions
|
#69 |
Member
Join Date: May 2009
Posts: 32
Rep Power: 17 |
Hi,
I want to modify the transient alternateReactingFoam, and to that end I would like to make a copy of the massfractions. In alternateReactingFoam the massfractions are created with the line: Code:
PtrList<volScalarField>& Y = composition.Y(); Code:
PtrList<volScalarField> YOld; for(label i=0; i<Y.size(); i++) { volScalarField * Ytmp = & Y[i]; YOld[i] = *Ytmp; Thanks! Edited: The following seems to be working (correct me if I'm wrong): Code:
PtrList<volScalarField> YOld(Y.size()); for(label i=0; i<Y.size(); i++) { YOld.set(i,Y[i]); Last edited by KrisT; November 16, 2010 at 07:02. Reason: Found out how to do? |
|
November 16, 2010, 09:02 |
|
#70 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Consequences: a) (YOld[i]-Y[i])==0 at all times b) Memory will be freed twice in the end So you might want to try set(i,new volScalarField(Y[i])) instead |
||
November 16, 2010, 09:36 |
|
#71 | |
Member
Join Date: May 2009
Posts: 32
Rep Power: 17 |
Quote:
I tried both, and in my very naive test Code:
Info<< "YOld[0].internalField()[45] " << YOld[0].internalField()[45] << "\n" << endl; Info<< "Y[0].internalField()[45] " << Y[0].internalField()[45] << "\n" << endl; Y[0].internalField()[45] = 0.15; Info<< "YOld[0].internalField()[45] " << YOld[0].internalField()[45] << "\n" << endl; Info<< "Y[0].internalField()[45] " << Y[0].internalField()[45] << "\n" << endl; 0.1 0.1 0.1 0.15 I'll stick with your formulation though (since I'm not completely convinced by this test). Thanks again, much appreciated! |
||
November 16, 2010, 13:02 |
|
#72 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
November 23, 2010, 07:54 |
Undestanding Cantera/OpenFOAM
|
#73 |
Member
Join Date: May 2009
Posts: 32
Rep Power: 17 |
I'm trying to understand Cantera and how it is linked to OpenFOAM (i.e., I'm at the same time trying to understand OpenFOAM - so please excuse me if my questions are stupid). For instance in createFields.H in Transient/alternateReactingFoam:
Code:
volScalarField rho ( IOobject ( "rho", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), thermo->rho() ); A bit further down in the same file: Code:
volScalarField& p = thermo->p(); const volScalarField& psi = thermo->psi(); const volScalarField& T = thermo->T();
Finally, what is the best source of information (to read) regarding issues like these? Thanks |
|
November 25, 2010, 08:40 |
|
#74 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
@rho: Yep @1: they are stored and maintained by the thermophysical-model @2: because the solver is not supposed to modify it @3: compressibility @further information: the source code. If you find other documents please let us know Bernhard |
||
November 25, 2010, 09:19 |
|
#75 |
Member
Join Date: May 2009
Posts: 32
Rep Power: 17 |
Great, thanks!
I do understand that the source is a good place to look (as would be any decent book in C++ ;-). Just one more question, I _guess_ that the expression Code:
thermo->correct(); Anyway, many thanks! |
|
November 25, 2010, 09:35 |
|
#76 |
Member
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15 |
Hello everybody,
I am looking for a steady state version of reactingFoam. Has anybody an idea where to get one? I'm using OF 1.7.1 where no steady state version is available. Best Tony |
|
November 25, 2010, 13:16 |
|
#77 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
November 26, 2010, 07:26 |
modify alternateSteadyReactingFoam to steadyReactingFoam
|
#78 |
Member
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15 |
Dear Bernhard,
a short question. Would it be a big deal to compile alternateSteadyReactingFoam without those additional capabilites related to cantera, sundials, blas ect.? I need only a steady alternative to reactingFoam. If so, what do I have to pay special attention to? Best Regards Tony |
|
November 26, 2010, 07:50 |
|
#79 |
Senior Member
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17 |
Hello Tony,
this should be possible but problems arise in the details. Just take the reactingFoam, change the PISO loop to a SIMPLE one as done in the alternateSteady solver and adapt the chemistry.H for steady-state. This was done in the alternate solver with the help of a cell residence time. This is a very very simple approach but you need that value because deltaT in steady-state is arbitrary. The next issue might occur with the ODE solver. All this is explained in the Berlin Presentation cited in the very first posting. Markus |
|
November 26, 2010, 11:48 |
|
#80 |
Member
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15 |
Hello Markus,
thanks a lot for your quick reply. I'll try this, following your hint, Tony |
|
|
|