CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Forces.C code explaination (https://www.cfd-online.com/Forums/openfoam-programming-development/196261-forces-c-code-explaination.html)

Friendly November 29, 2017 16:15

Forces.C code explaination
 
Hi,

I have two questiosn belonging the following code:

Code:

vectorField fN
(
rho(p)*Sfb[patchi]*(p.boundaryField()[patchi] - pRef)
);

  vectorField fT(Sfb[patchi] & devRhoReffb[patchi]);

Does anyone know what is meant by Sfb and RhoReffb or Reffb? I think Sfb is the area of the face i. "dev" subtracts the trace from the tensor. RhoReffb should be something like mu*grad(u).

Friendly November 29, 2017 17:04

Ok I found out that R() represents the reynolds stress tensor.

Reff() is the effective stress tensor, does anyone know what is meant by effective here?

Any why there is a "b" at the end of Sf "b" and RhoReff "b"()? Boundary maybe?

Tobi November 30, 2017 02:19

Pool Gor mathematics, numerics, derivations and openfoam. There you find the definition of DevRhoREff

Friendly November 30, 2017 07:09

Thanks, that helped a lot.

Just two more question: Why is there a "b" at the end?

In "devRhoReffb" Rho is stands for a density based equation. I am calculationg an incompressible case and still getting values of it. Does this equation represent a general Approach to calculate fT?

Maybe something changed, I am using OpenFOAM 4.1.

Tobi November 30, 2017 07:40

As we are only interested in the force acting on a patch, the b postfix just shows one that it is related to boundary values, which can be already seen in the snipped you provided. You can name the variables as you want.

Friendly November 30, 2017 11:35

Ok thanks I thought that.

Btw I have found out that for the incompressible case devRhoReff equals devReff.

Ok so the last part that I am missing is the missing normal vector. There should be a normal vector for calculating the pressure force and another one for the friction force. Are they in Sfb[patchi]?


All times are GMT -4. The time now is 08:35.