|
[Sponsors] |
July 26, 2010, 06:13 |
How OpenFoam stores variable values
|
#1 |
Senior Member
|
Hi Foamers.
I am having difficulties in understanding how OpenFoam stores variables, in particular dependent variables like for example velocity vector and stress tensor field, in the elements, and how it uses them when performing calculations, especially those associated with div schemes for convection and convective related derivatives. Information in the literature, including Jasak thesis, are not very user friendly in this regard. The problem is that my boss wants to know every little detail concerning OpenFoam, and he is having doubts that OpenFoam is any good. Regards, António Martins |
|
July 28, 2010, 06:33 |
|
#2 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
Quote:
http://foam.sourceforge.net/doc/Doxy...ca1069e5ec8d15 you can work back to the GeometricField http://foam.sourceforge.net/doc/Doxy...tricField.html which gets you to a DimensionedField.html http://foam.sourceforge.net/doc/Doxy...onedField.html which has a dimensionSet http://foam.sourceforge.net/doc/Doxygen/html/classFoam_1_1dimensionSet.html for managing consistence in the operations and then there are the various bits of the field (internal, boundary..) BTW: what happens when your boss can't get the same implementation information for a commercial code? I guess he wouldn't use a commercial code then. |
||
August 4, 2010, 10:25 |
|
#3 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
VectorSpace has the actual data members for the tensor and vector components, which it stores as arrays. OpenFOAM defines its own lists, which I doubt are much different from STL lists. Fields are lists with algebra defined (for instance, using operator overloads). GeometricFields are fields with boundaries defined.
The indexing of the lists varies by what is defined. For instance, the diagonal coefficients are scalarFields, indexed by cell number; the owner and neighbour coefficients are also scalarFields, but these are indexed by cell faces. My boss also had concerns about OpenFOAM. It seems the open source can scare some people... but try and find a commercial code that tells you where its TensorFields are stored. |
|
August 5, 2010, 15:58 |
|
#4 |
New Member
Join Date: Jan 2010
Posts: 12
Rep Power: 16 |
You can find information about the basic principles in
Weller, Tabor, Jasak, Fureby; A tensorial approach to computational continuum mechanics using object-oriented techniques, 1998 http://powerlab.fsb.hr/ped/kturbo/op...apers/Foam.pdf. Luise |
|
September 2, 2010, 23:07 |
|
#5 | |
Senior Member
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24 |
Quoting David:
Quote:
Code:
00041 // Construct with length specified 00042 template<class T> 00043 Foam::List<T>::List(const label s) 00044 : 00045 UList<T>(NULL, s) 00046 { 00047 if (this->size_ < 0) 00048 { 00049 FatalErrorIn("List<T>::List(const label size)") 00050 << "bad size " << this->size_ 00051 << abort(FatalError); 00052 } 00053 00054 if (this->size_) 00055 { 00056 this->v_ = new T[this->size_]; 00057 } 00058 } Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D. Research Scientist Research Center for Computational Methods (CIMEC) - CONICET/UNL Tel: 54-342-4511594 Int. 7032 Colectora Ruta Nac. 168 / Paraje El Pozo (3000) Santa Fe - Argentina. http://www.cimec.org.ar |
||
September 2, 2010, 23:33 |
|
#6 | |
Senior Member
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24 |
Titio, you said:
Quote:
Respect of div schemes for convection and convective related derivatives, it depends on the kind of operations you want to do, if these are implicit operations (fvm) or explicit (fvc) ones. Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D. Research Scientist Research Center for Computational Methods (CIMEC) - CONICET/UNL Tel: 54-342-4511594 Int. 7032 Colectora Ruta Nac. 168 / Paraje El Pozo (3000) Santa Fe - Argentina. http://www.cimec.org.ar |
||
October 14, 2010, 11:56 |
Hi
|
#7 |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 17 |
Hi
i have something like this and i don't know if it is implemented in openfoam it is: fvc::div(nusEff * T) where nusEff is a scalar spacial varying viscosity law to be defined and T is a tensor so if i do fvc::div(nusEff *T), will it be ok in openFoam? or it should be done another way? How to define a new nusEff , lets for example in simpleFoam different from the existing nuEff()? thanks |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM - Validation of Results | Ahmed | OpenFOAM Running, Solving & CFD | 10 | May 13, 2018 19:28 |
Reference Values for Troughs @ variable Angle? | hornig | FLUENT | 1 | April 12, 2014 23:26 |
max node values exceed max element values in contour plot | jason_t | FLUENT | 0 | August 19, 2009 12:32 |
How to monitor variable values of point at t=0 sec | yunhee | CFX | 3 | February 13, 2008 13:45 |
Strongly variable and high viscosity | bergantz | OpenFOAM Running, Solving & CFD | 1 | June 23, 2007 11:02 |