CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

A question about the source code of realizableKE.C

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By yuhai
  • 1 Post By yuhai

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 24, 2009, 15:45
Default A question about the source code of realizableKE.C
  #1
Member
 
Hai Yu
Join Date: Mar 2009
Location: Harbin
Posts: 67
Rep Power: 15
yuhai is on a distinguished road
Hallo, foamers,
My question is about using realizable KE on dynamic mesh.
I am reading the realizableKE.C, and found the treatment of Cmu:

--------------------------------------------------
tmp<volScalarField> realizableKE::rCmu
(
const volTensorField& gradU,
const volScalarField& S2,
const volScalarField& magS
)
{
tmp<volSymmTensorField> tS = dev(symm(gradU));
const volSymmTensorField& S = tS();
volScalarField W =
(2*sqrt(2.0))*((S&S)&&S)
/(
magS*S2
+ dimensionedScalar("small", dimensionSet(0, 0, -3, 0, 0), SMALL)
);
tS.clear();
volScalarField phis =
(1.0/3.0)*acos(min(max(sqrt(6.0)*W, -scalar(1)), scalar(1)));
volScalarField As = sqrt(6.0)*cos(phis);
volScalarField Us = sqrt(S2/2.0 + magSqr(skew(gradU)));
return 1.0/(A0_ + As*Us*k_/(epsilon_ + epsilonSmall_));
}


tmp<volScalarField> realizableKE::rCmu
(
const volTensorField& gradU
)
{
volScalarField S2 = 2*magSqr(dev(symm(gradU)));
volScalarField magS = sqrt(S2);
return rCmu(gradU, S2, magS);
}
----------------------------------------------------------


in line:
------------------------------------------------
volScalarField Us = sqrt(S2/2.0 + magSqr(skew(gradU)));
--------------------------------------------------

I guess this is well for a fixed mesh.

but for a dynamic mesh, we have these equations:



http://venus.imp.mx/hilario/SuperComputo/Fluent.Inc/manuals/fluent5/ug/html/node349.htm
I am wondering whether the "skew(gradU)" should substract something, before being the operation of "magSpr" for a dynamic mesh?
or the tensors are already updated in some other modules before this step?

Maybe this is a stupid question, for I am not good at matrix............., I am still waiting for your answer.



Best Regards
Hai
atulkjoy likes this.

Last edited by yuhai; June 26, 2009 at 09:06.
yuhai is offline   Reply With Quote

Old   June 26, 2009, 09:05
Default
  #2
Member
 
Hai Yu
Join Date: Mar 2009
Location: Harbin
Posts: 67
Rep Power: 15
yuhai is on a distinguished road
realizable.C
Attached Files
File Type: txt realizableKE.txt (7.2 KB, 24 views)
atulkjoy likes this.
yuhai is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23
UDF - Source Term Question Jacques FLUENT 0 December 8, 2008 14:40
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51
heat equation solution source code john Main CFD Forum 1 May 28, 2004 00:41
who has source code for cfd xingqiuYuan Main CFD Forum 3 June 5, 2002 05:38


All times are GMT -4. The time now is 07:18.