|
[Sponsors] |
March 28, 2013, 15:44 |
Help plz
|
#1 |
New Member
Aria
Join Date: Nov 2012
Posts: 5
Rep Power: 13 |
hi everybody
I am writing a solver which needs two dependent parameters to be solver parallel. Actually c=f(D) and then D must be solved using already solved c. in other words, c and D have to be solved after ther one.but there is something wrong with the term "dimensionedScalar" here is an abstract of the solver: fvScalarMatrix cEqn ( fvm::ddt(c) + fvm::div(phi, c) - fvm::laplacian(Dc, c) ); cEqn.relax(); cEqn.solve(); // Diffusionskoeffizient D(c,T) dimensionedScalar g = 1.0/(1.0 + Rho1/Rho2 * (1.0/c - 1.0) ); Info << "g=" << f.value() << " " << f.dimensions() << endl; Dc = D0 * g * ................ --------------------- in which, g at each time step is a function of c that has been already calculated in previous time step. how should I loop them? thanks |
|
March 28, 2013, 17:35 |
|
#2 |
Senior Member
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22 |
Hi Ariaballack,
You try to convert a volScalarField (I presume) c into a dimensionedScalar g. This is simply not possible. If c is a field, g must be as well. So change dimensionedScalar in Code:
volScalarField g("g",1.0/(1.0 + Rho1/Rho2 * (1.0/c - 1.0) )); * I don't really know what 'c' exactly represents but it seams to me that in principle 'c' can be 0 locally. If this is the case 1/c might result in a floating point error. But this is quite easy to solve by writing c in the numerator * From dimensional point of view, the expression for g is kind of strange because you subtract a dimensionless field (1.0) from a dimensioned field (1/c) (I'm pretty sure this will give an error when you run the code). Cheers, L |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GAMBIT] Gambit Start Up error .... HELP PLZ! | Abhya | ANSYS Meshing & Geometry | 2 | July 12, 2012 01:40 |
plz help me! | saha2122 | FLUENT | 4 | September 21, 2010 08:17 |
plz help its urgent | garima chaudhary | FLUENT | 0 | September 25, 2007 06:28 |
plz ......help me out.....************************ | krishna | FLUENT | 2 | January 10, 2007 03:53 |
Doubt - while running iteration, plz help | sak | FLUENT | 0 | September 7, 2005 00:16 |