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

programming

Register Blogs Community New Posts Updated Threads Search

programming
Old

fieldAverage & moving mesh

Posted April 12, 2017 at 09:58 by kindle

see through this. How they figure it out.

Quote:
Originally Posted by wyldckat View Post
Greetings Pete,

I see that you've got 2 reports on this topic:
If I understand you correctly, you want to do a plain average of the fields over the existing time snapshots?

In addition, do you mean that the average results for a dynamic mesh are acceptable for doing
...
New Member
Views 869 Comments 0 kindle is offline Edit Tags
Old

runTime.write()

Posted April 4, 2017 at 09:42 by kindle

Code:
for (const_iterator iter = begin(); iter != end(); ++iter)


is replaced by

Code:
forAllConstIter(HashTable<regIOobject*>, *this, iter)


iterator is a built-in pointer of containers, here class objectRegistry inherates from regIOobject and more importantly has access to a table of IOobject.

In the above iteration, iteration is done for all object registried.

In the quoted code, iter() is a pointer pointing to IOobject and it calls writeOpt()
...
New Member
Posted in programming
Views 987 Comments 0 kindle is offline Edit Tags
Old

could not open file ** for ** when compiling

Posted March 31, 2017 at 12:46 by kindle

if the problem is :
could not open file ** for xx due to No such file or directory. Maybe it's that after option -I you have a blank space before the INC directory.

Code:
-I$(LIB_USER_SRC)/viscoelasticFluidFoam-1.0-OpenFOAM-2.1.x/src/transportModels/viscoelastic/lnInclude
will do but
Code:
-I $(LIB_USER_SRC)/viscoelasticFluidFoam-1.0-OpenFOAM-2.1.x/src/transportModels/viscoelastic/lnInclude
may not.

Quote:
Originally Posted by Artur View Post
Hi,

I've just built OF 2.2.2 from
...
New Member
Views 943 Comments 0 kindle is offline Edit Tags
Old

Excellent tutorial for debugging

Posted March 10, 2017 at 12:50 by kindle

banana and old-school printing out.

Cool !

Quote:
Originally Posted by wyldckat View Post
OK, so as I mentioned in one of the posts above, having an example case as a basis and using the "banana" trick, here's what I've done (used OpenFOAM 2.3.x for this example):
  1. Made a copy of the tutorial "lagrangian/DPMFoam/Goldschmidt" and ran the utility blockMesh.
  2. Then I had to look at which file needed to modified. All pointed to the file "constant/kinematicCloudProperties".
  3. Now I had
...
New Member
Posted in programming
Views 1615 Comments 0 kindle is offline Edit Tags
Old

access to data

Posted February 28, 2017 at 06:17 by kindle
Updated February 28, 2017 at 13:41 by kindle

// access to field<Type>

Ex: in /finiteVolume/fields/fvPatchField/derived/turbulentInlet.C.
This class is templated, here we take a example for vector field:

Code:
Field<vector> randomField(this->size());
to have access to x-component for example
Code:
Info << "randomField = " << randomField.component(vector::X) <<
    endl;
// vector::X=0 this enum equals to 0 as enum's
...
New Member
Posted in programming
Views 1091 Comments 0 kindle is offline Edit Tags

All times are GMT -4. The time now is 14:50.