2
$\begingroup$

I am trying to implement a 2D turbulence problem with the model of Spalart-Allmaras. Therefore, I need to extract the global gauss coordinates to define parameter 'd' which stands for the distance to the nearest wall. Does someone know how to extract the global gauss coordinates of the whole computational domain (not for just one element) before performing the simulation?

Thanks and best regards

$\endgroup$
6
  • $\begingroup$ We can't implement SA model in general case. There are hundreds implementations for turbulent flow simulation in special cases. What do you try to solve? $\endgroup$ Commented Mar 21, 2023 at 12:17
  • $\begingroup$ I am trying to solve the turbulent channel benchmark in 2D. $\endgroup$ Commented Mar 21, 2023 at 13:25
  • $\begingroup$ Here's a link to the benchmark: featool.com/doc/Fluid_Dynamics_09a_turbulent_channel_flow1 $\endgroup$ Commented Mar 21, 2023 at 13:46
  • 1
    $\begingroup$ See my post on mathematica.stackexchange.com/questions/217201/… . We can use eps = 10^-6; d = Sqrt[y^2 + eps^2] in the boundary layer. $\endgroup$ Commented Mar 21, 2023 at 15:19
  • $\begingroup$ @AlexTrounev: I think this is a directly AceGen/AceFEM related question. This cannot really be related to the Mathematica FEM implementation way. $\endgroup$
    – Max
    Commented Mar 22, 2023 at 8:46

1 Answer 1

4
$\begingroup$

I did this for 3D linear hexahedral element using shape functions and local integration point coordinates:

IPcoor = Table[Table[
Sum[
 ShaFun[[inp, isf]]*
  SMTNodeData[SMTElementData[elnum, "Nodes"], "X"][[isf]]
 , {isf, 1, 8}]
, {inp, 1, 8}],{elnum, 1, NumEl}];

The shape functions were calculated as follows:

{\[Xi]ih, \[Eta]ih, \[Zeta]ih} = {{-1, 1, 1, -1, -1, 1, 
1, -1}, {-1, -1, 1, 1, -1, -1, 1, 1}, {-1, -1, -1, -1, 1, 1, 1, 
1}};

Nih[xxx_, yyy_, zzz_] := MapThread[1/8 (1 + xxx #1) (1 + yyy #2) (1 + 
  zzz #3) &, {\[Xi]ih, \[Eta]ih, \[Zeta]ih}]

ShaFun = Table[Nih[IPCS1[[i, 1]], IPCS1[[i, 2]], IPCS1[[i, 3]]], {i, 1, 8}]

And the coordinates of the integration points in the coordinate system of an element are the following.

IPCS1 = {
{-0.5773502691896257`,0.5773502691896257`,-0.5773502691896257`}, {0.5773502691896257`, -0.5773502691896257`, -0.5773502691896257`}, {-0.5773502691896257`,0.5773502691896257`,-0.5773502691896257`}, {0.5773502691896257`,0.5773502691896257`,-0.5773502691896257`},
{-0.5773502691896257`,-0.5773502691896257`,0.5773502691896257`},{0.5773502691896257`,-0.5773502691896257`,0.5773502691896257`}, {-0.5773502691896257`,0.5773502691896257`,0.5773502691896257`}, {0.5773502691896257`,0.5773502691896257`,0.5773502691896257`}
};

You can check the coordinates of integration points of your element e. g. in Appendix C of the book "Automation of finite element methods" by Korelc and Wriggers, Springer, 2016.

$\endgroup$
1
  • $\begingroup$ Thanks for your answer! $\endgroup$ Commented Mar 22, 2023 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.