an sigFpe error on Turbulence
1 Attachment(s)
Code:
Selecting thermodynamics package |
Hi Ehsan,
As I've told you in the past, the turbulence fields cannot be initialized with 0 (zero), even if they're calculated in the next iteration. In this case, you have this: Code:
left Best regards, Bruno |
oh,what a careless doing!
let me test it. |
Hi
the new error is: Code:
Reading field gas |
Hi Ehsan,
I saw that error yesterday and forgot to tell you about it: it's probably due to a division by zero. Problem is that it does not indicate where exactly this occurs. And since you have 2 patches using "groovyBC", debugging this in a single step is extremely complicated. My suggestion is to reduce the complexity by diving the problem into smaller problems:
Code:
debug on; Good luck! Bruno |
Hi dear Bruno
you told me about crashing. I have used different initial values(internalField and on the walls) I had set k Code:
valueExpression "1.5*sqr(l*I*U)"; Code:
left in laminar it works fine as I told you. please let me know if you find the cause. |
Hi
I did 1 and 2 without success. maybe the problem is on mut and alphat: Code:
dimensions [1 -1 -1 0 0 0 0]; |
Hi Bruno
I found out its because of epsilon(or omega)expression I have put there. Code:
valueExpression "pow(c_mu,.75)*pow(k,1.5)/l";//pow(c_mu,.75)*pow(k,1.5)/l could anyone give me an advice why this error occurs on epsilon(only)? Code:
Mean and max Courant Numbers = 3.854767141 23.51635184 I also replaced k formula but it's not because of k variable in epsilon file. Code:
valueExpression "pow(c_mu,.75)*pow(1.5*sqr(l*I*mag(U)),1.5)/l"; Code:
realizableKECoeffs |
Hi Ehsan,
I got your email and I've taken a look at the files you had sent me before. OK, so the problem is due to a "divide" gone wrong. The expression in question is: Code:
valueExpression "pow(c_mu,.75)*pow(k,1.5)/l"; If we look at the formulas in questions for calculating "l", we find these: Code:
"a=.003;" "a" is constant and "b" is variable... therefore, the problem is "b". Which leads us to "pos()", which is known for easily having positions with components equal to 0 (zero). Or because "max(p.y)==p.y". This is the problem you're having! Now, my question is: why are you using a variable "b" and not a constant "b"? Because from what I know (which might not be 100% correct), the "hydraulic diameter" is usually a fixed value, because it's the diameter of the whole entrance. It's like the Reynolds number: it's usually the same for the whole inlet... at least if the flow is the same for the whole inlet! ;) Best regards, Bruno |
Oh,what an accurate man you are!exactly its for that!I 'll test some minutes later.
as you see in my case,the entrance opens to outside gradually(like a wall moves and opens to an environment) so I thought I have to use a variable hydraulic diameter and since the opening is 0 at first and becomes full opened during movement of the wall D_H should be variable.so i have to use full D_H in your opinion or my thought is correct?:) |
I forgot about the "dynamic opening" detail... but... then why aren't you using "min" as well?
Code:
"b=max(pos().y)-min(pos().y);" |
then it becomes whole the channel height again.I wonder why pts doesn't work?!
|
Quote:
Therefore, if the points on your patch are dynamically moving, then the "pos()" values should adapt accordingly as well! Therefore, the min/max values refer only to the size of the current patch. Quote:
Code:
pos().y == max(pos().y) I thought you already knew that "pos()" referred to the position of the face centres of the patch only. Quote:
|
yes I knew.the patch left has height equal to .004m(4mm) and min(pos().y) is equal to 0 and max(pos().y) is equal to .004 then the difference expression becomes .004 that is the height totally.
imagine there are 3 cells on the left patch.points refer to inlet opened and vertical line indicate that the face of cell is a wall(fixed velocity and zeroGradient p and T) and it opens gradually like this: Code:
______________ _________________ __________________ ___________________ I found out why its zero.in most top cell max(pos().y) is equal to pos().y I thought it may be solved by using pts(so that it give us the height of first cell from top of patch) but this error occurred : Code:
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 |
Hi Bruno
I foun a way.I need the cell height.how to obtain a cell height? maybe: Code:
mag(Sf())/.003 is it true? -------------------------------- Bruno it works nooooooooooooooow! thank you for helping a looooooooooooooooooot! |
a divergence occurs during run:
Code:
Mean and max Courant Numbers = 0.01607557706 0.09894979529 k: Code:
valueExpression ".00003";//1.5*sqr(l*I*mag(U)) Code:
valueExpression ".0001";//pow(c_mu,.75)*pow(k,1.5)/l |
Hi Ehsan,
As for the error you showed in that post, there was a square root of "0" or of a negative value, which is why it crashed. There are only 2 "sqrt" in "Foam::compressible::RASModels::realizableKE::corr ect()", at "src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.C":
So either "gradU" has zeros in it; or the second "sqrt" has got "mu()" or "epsilon_" equal to zero in at least one entry of the respective fields. Best regards, Bruno |
Hi Bruno
You think its related to initial conditions? I'll test on the backward cases i sent to you before. Could you please do some tests which of cases you want tomorrow night and let me know your opinion to reach the answer more rapidly? Thank you. |
1 Attachment(s)
Hi Bruno.I attached a test case.
and this error occurs when run yPlus220: Code:
ehsan@Ehsan-com:~/Desktop/shockTube_backwards_Tank/BackwardStep/for_test3$ yPlus220 |
Hi Ehsan,
I haven't looked at the test case yet, but from the error you've shown, it looks like the problem is that you forgot about using "-compressible". I'll give some more feedback, once I manage to look at the case in about 30min. |
All times are GMT -4. The time now is 06:28. |