|
[Sponsors] |
April 24, 2013, 13:45 |
|
#61 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
thanks.
thus if I comment out that coeffs and use a crankNicolson .5 scheme it will be like a rhoPimpleFoam.true? but I've found it more stable than rhoPimpleFoam even when I use crankNicolson and without coeffs. whats your opinion about this method?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
April 24, 2013, 14:44 |
|
#62 |
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 17 |
if you remove the "localEuler rDeltaT", the coefficients become useless so you actually don't even need to comment them. You can still do it for safety but you also need to check in the code what is the default value (sometimes even you don't declare it, the solver takes a default value by itself).
I also found that it is more stable but I didn't compare the 2 codes. I think only the pressure file has been changed. |
|
April 24, 2013, 15:11 |
|
#63 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
these are defaults:
Code:
scalar rDeltaTSmoothingCoeff ( pimpleDict.lookupOrDefault<scalar>("rDeltaTSmoothingCoeff", 0.02) ); scalar rDeltaTDampingCoeff ( pimpleDict.lookupOrDefault<scalar>("rDeltaTDampingCoeff", 1.0) ); there isn't any p folder in rhoLTSPimpleFoam.it seems it uses same folder of p as rhoPimpleFoam.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
April 25, 2013, 05:12 |
|
#64 | |
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 17 |
This is a C++ requirement... If you use the solver, you must create the variable and if possible initialize it in case the user made a mistake or forgot it. No matter if you use it or not, the variable must be there ! It is declared in the program so the program creates it.
As a programmer, you always try your best to give a default value to a variable to avoid any hazardous effects. Here the solver gives a default value like any other function does. For example, the k-epsilon model gives default value for the constant but you can use others if you want. The two variables are used just below there declaration: Code:
// Limit rate of change of time scale // - reduce as much as required // - only increase at a fraction of old time scale if ( rDeltaTDampingCoeff < 1.0 && runTime.timeIndex() > runTime.startTimeIndex() + 1 ) { rDeltaT = rDeltaT0 *max(rDeltaT/rDeltaT0, scalar(1) - rDeltaTDampingCoeff); Info<< "Damped flow time scale min/max = " << gMin(1/rDeltaT.internalField()) << ", " << gMax(1/rDeltaT.internalField()) << endl; } Code:
if (rDeltaTSmoothingCoeff < 1.0) { fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff); } Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF error - parabolic velocity profile - 3D turbine | Zaqie | Fluent UDF and Scheme Programming | 9 | June 25, 2016 20:08 |
unable to get parabolic velocity profile with pimplefoam | houkensjtu | OpenFOAM | 4 | October 8, 2012 05:41 |
Emergency:UDF for a time dependent parabolic velocity | zumaqiong | Fluent UDF and Scheme Programming | 12 | March 25, 2010 13:00 |
Neumann pressure BC and velocity field | Antech | Main CFD Forum | 0 | April 25, 2006 03:15 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 06:13 |