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

Blog Entries

Register Blogs Members List Search Today's Posts Mark Forums Read

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 212 Comments 0 kindle is offline Edit Tags
Old

printStack(Foam::Ostream& ) with simpleFoam -parallel

Posted March 10, 2017 at 05:55 by kindle

debug version will give line numbers. Ok. May worth the cost.

Quote:
Originally Posted by gschaider View Post
A bit more information would be nice:
- does this problem also occur when you run the case in serial
- when does it happen (during the construction of the turbulence model, but I deduced that from your stack-trace)
- line numbers would be nice, but you'll need a Debug-version of OF for that

My guess is that this is (again) the old "I set k/epsilon/omega to 0 in the initial conditions (or
...
New Member
Posted in Uncategorized
Views 147 Comments 0 kindle is offline Edit Tags
Old

Floating point exception (resolved. problem in mesh quality)

Posted March 10, 2017 at 05:54 by kindle

Try to get this tracking process of problem

Quote:
Originally Posted by cristian.arbe View Post
Hello all,

I am relatively new to OpenFoam and I am trying to simulate a photoreactor on incompressible turbulent flow at steady-state. I copied most of the code of the pitzDaily model from the tutorials adjusting all the parametres for my case. When running the case in parallel I get the following error:

Code:
mpirun noticed that process rank 7 with PID 3333 on node XXXXX exited on signal 8 (Floating point exception).
Commands
...
New Member
Posted in Uncategorized
Views 144 Comments 0 kindle is offline Edit Tags
Old

fvc - solvers/basic/

Posted March 2, 2017 at 05:16 by kindle

fvc can be used to calculate values using field data at the current time step.

// scalarTransportFoam

#include "CourantNo.H" :

scalarField sumPhi
(
fvc::surfaceSum(mag(phi))().internalField()//公式(2)
);//scalarField在OpenFOAM中为一系列scalar组成的场,其区别于volScalarF ield主要为不具有边界条件等信息...
New Member
Posted in programming
Views 481 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 289 Comments 0 kindle is offline Edit Tags

All times are GMT -4. The time now is 23:31.