Problem to calculate grad(U) using swak4Foam
Dear Foamers,
I need to calculate the strain rate tensor S_ij . In OpenFOAM this is made using the relation S_ij = symm(grad(U)). I am trying do this with swak4Foam (funkyDoCalc) but I just can't calculate grad(U). The error is the following: Code:
Time = 1100 Thanks, Hugo |
Quote:
|
Quote:
Thanks Bernhard, Hugo |
2 Attachment(s)
Thanks for the patch!
I applied it to 1.6 but I still get the Code:
Parser Error at "1.1-4" :"field grad not existing or of wrong type" Furthermore, I pulled the developing version with mercurial and I get errors when trying to recompile in OF 1.7.1 on OS X 10.6.8. I tried in a desktop and in a laptop with the same result. The recompilation in Ubuntu 11.04 showed -apparently- no errors. Could you please take a look at the attachment ? Thanks! h |
Quote:
|
Quote:
I wish to use the "grad(U)" function for the inlet boundary condition for "Tau" using groovyBC. Where, U is fully developed flow. I am getting following error message: Code:
--> FOAM FATAL ERROR: Is "grad(U)" boundary condition possible using groovyBC? I am using OF-2.1.x installed on Ubuntu 11.04 Thanks in advance! |
Quote:
|
Thank you for quick reply.
|
Hi Hugo
I need to develop a similar script to plot the strain rates. did you have any success? Regards f |
Quote:
Quote:
Best Luck! |
Quote:
Yes, you can calculate grad(U) using expressionField and then manipulate the result as with any other field. This way, you could calculate the instantaneous rate of strain and then control the averaging process as convenient. I do this in controlDict and not with funkyDoCalc as I tried originally. Hope it helps, |
doesn't openfoam have the utility to calculate the velocity gradient? what does swakfoam do more that the preloaded utility?
|
what is the difference between this swak function and surfaceFieldValue?
Sorry to revive an old post but I am encountering a related problem.
I have been trying to compute grad(U) on wall patches using swak4Foam and built-in OF function surfaceFieldValue and compare the results. After looking at this post, I realise I have been trying to do the impossible as grad(U) is not defined on patches: Quote:
Code:
extremesGradU { Now, if I use surfaceFieldValue to compute grad(U) on the "walls" patch, I do get an output: Code:
maxGradUOnWalls Therefore my question is: why does surfaceFieldValue compute grad(U) if grad(U) not defined on boundary patches? Perhaps I have misunderstood what surfaceFieldValue does. Strangely enough then, if I try to compute snGrad(U) using surfaceFieldValue I do not get an output, but I do get an output for snGrad(U) in swak. p.s. I have tested these on depthCharge2D tutorial. |
All times are GMT -4. The time now is 06:10. |