declaration of an empty fvScalarMatrix
Hi fellows,
I want to underrelax some equation, so I have to declare fvScalarMatrix someEqn outside of my loop to prevent it from being deleted after each loop cycle right? But I can't use rubbish for initialization, because then it will be used for under-relaxation. So I need some kind of "empty" matrix, which will not be used for the relaxation. Is it possible? If not, can I prevent the under-relaxation in the first iteration? best regards, Ilya |
Under-relaxation is already implemented in OpenFOAM.
See for instance pisoFOAM. The amount of under-relaxtion can be controlled in fvSolution. Look for relaxtionFactors specified in fvSolution of some of the tutorials. |
Well, I know that the under-relaxation is already there, but my problem is that i have two loops, say i and j (j is the inner one) and I want to relax a matrix A in each j-iteration with the same value from the last i-iteration. Simplified:
Code:
for (i=0; i<n; i++) So either I could implement the relaxation by hand, or I could overwrite the previous value of A_new (how?) with A_old stored separately. Which variant would you suggest me? Or do somebody have another ideas? regards, ilya |
another question,
for a transient simulation, is F.oldTime() the same as F.prevIter(), where F is some vol...Field? Are both of these fields stored? If so, can F.prevIter() be overwritten simply by using F.storePrevIter();? Where both of them are being stored per default: at runTime.write(), runTime++ or somewhere else? In GeometricField.C I saw additional outputs while using storePrevIter() and storeOldTime() inside of if(debug){}. How the debug mode can be switched on? best regards, ilya |
All times are GMT -4. The time now is 18:58. |