CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   swak4Foam & Radial velocity (http://www.cfd-online.com/Forums/openfoam/124114-swak4foam-radial-velocity.html)

sasanghomi September 27, 2013 11:09

swak4Foam & Radial velocity
 
Hi foamers

I have two questions about swak4Foam :

1) I want to calculate radial velocity in an engine . Can I do this action by using swak4Foam? How? which type ? Can you write an example here?

2) How can I calculate an expression according to variables ? for example I want to use probe and I want to have sqrt(2*k/3) in a specific point versus time { k is turbulent energy }.How can I do that?

I appreciate any help,
Thanks and best regards,
Sasan.

gschaider September 27, 2013 15:08

Quote:

Originally Posted by sasanghomi (Post 453897)
Hi foamers

I have two questions about swak4Foam :

1) I want to calculate radial velocity in an engine . Can I do this action by using swak4Foam? How? which type ? Can you write an example here?

I've got to hand you back this question: can you be more specific? Do you want a new field, an average or what? You want it during the run or afterwards? And what is your definition of "radial velocity"?

Anyway: if you can write that definition as an expression on a piece of paper then you can calculate it in swak (probably in terms of velocity, position and the axis). Only thing you need to know is that & is the inner product of two vectors and ^ is the cross product (but you were probably aware of that if you looked at the Wiki-page and the incomplete reference guide http://openfoamwiki.net/images/d/db/...mReference.pdf)

Quote:

Originally Posted by sasanghomi (Post 453897)
2) How can I calculate an expression according to variables ? for example I want to use probe and I want to have sqrt(2*k/3) in a specific point versus time { k is turbulent energy }.How can I do that?

That'd be a swakExpression-function object with valueType "set". There are examples for that in the Examples-folder of the distro and something like that is for instance explained in the presentation from the 6th workshop (linked from the Wiki-page)

Please have a look at the mentioned presentation and the reference guide before asking further. I only have a limited amount of time for supporting these things and every time I answer questions that are already documented I have less time to complete the actual documentation.

sasanghomi September 28, 2013 05:44

Dear Bernhard ,

Thank you very much for your reply and I am sorry for asking simple question.
I appreciate your help and your attention.
I have another question . Can you help me?
I want to calculate engine swirl :

w=\frac{\int (\vec{r}\times \vec{v})dV}{\int \vec{r}^{2}dV}

That : {v= velocity & V=volume & r = position & Rs=swirl ratio &N=rpm}

R_{s}=\frac{w_{z}}{2\pi N}

I want to calculate Rs. Can I calculate Rs by using swak4Foam? I think swak doesn't have integration.Also I don't know how can I use r vector in swak !!! Can you guide me?


Best regards
Sasan.


All times are GMT -4. The time now is 05:37.