|
[Sponsors] |
April 14, 2011, 04:29 |
fortran code for taylor green vortex
|
#1 |
Senior Member
Hassan
Join Date: Apr 2009
Posts: 106
Rep Power: 17 |
i need fortran code for the initial and boundary condition of taylor green vortex problem...
will be thankful if somone can give me the fortran code in which the initial and boundary conditions are applied.... thanks and regards |
|
July 14, 2011, 15:14 |
|
#2 |
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20 |
Hello,
the initial and boundary conditions for the Taylor Green Vortex are very simple. It's a 3d domain of size (2*Pi)^3, all bcs are periodic, no magic there. The initial conditions are simple sin/cos analytical functions, see the JFM article of Brachet or the very good phd dissertation of Fauconnier; http://users.ugent.be/~dfauconn/research.htm cheers, cfdnewbie |
|
July 18, 2011, 11:26 |
|
#3 |
New Member
Join Date: Jul 2011
Posts: 8
Rep Power: 15 |
Hi,
An example of z-wise Taylor Green vortex initialization in Fortran: (Xf1,Xf2,Xf3) is are space coordinate and Tf is the time. The viscosity had to be setup appropriately. Code:
! ! DESCRIPTION: z-wise Taylor-Green vortices ! Real (Kind=double) Function u1TGzwisee (Xf1, Xf2, Xf3, Tf) Real (Kind=double) Xf1 Real (Kind=double) Xf2 Real (Kind=double) Xf3 Real (Kind=double) Tf Real (Kind=double) cgret cgret = Sin (Xf1/0.5D1) * Cos (Xf2/0.5D1) * Exp & & (-0.2D1/0.25D2*Tf) u1TGzwisee = cgret Return End Function u1TGzwisee ! Real (Kind=double) Function u2TGzwisee (Xf1, Xf2, Xf3, Tf) Real (Kind=double) Xf1 Real (Kind=double) Xf2 Real (Kind=double) Xf3 Real (Kind=double) Tf Real (Kind=double) cgret cgret = - Cos (Xf1/0.5D1) * Sin (Xf2/0.5D1) * Exp & & (-0.2D1/0.25D2*Tf) u2TGzwisee = cgret Return End Function u2TGzwisee ! Real (Kind=double) Function u3TGzwisee (Xf1, Xf2, Xf3, Tf) Real (Kind=double) Xf1 Real (Kind=double) Xf2 Real (Kind=double) Xf3 Real (Kind=double) Tf Real (Kind=double) cgret cgret = 0D0 u3TGzwisee = cgret Return End Function u3TGzwisee |
|
July 18, 2011, 17:01 |
|
#4 |
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20 |
Hey Squirrel,
why do you have a time dependence in your initialization? From what I understand, die Taylor Green Vortex is initialized at t=0 as a sine/cosine function, and then left to develop on its own?!!..... why do you need an exponential damping term in there? thx and cheers cfdnewbie |
|
July 18, 2011, 23:02 |
|
#5 |
New Member
Join Date: Jul 2011
Posts: 8
Rep Power: 15 |
You can set Tf to 0 or what you want you will still have TG.
It's useful to have the time in this function for follow the evolution after the initialization. The exponential damping term is here because of the viscosity. You have to set it in function of the viscosity that you have in the problem. By the way HaKu, what is the BCs that you consider ? |
|
July 19, 2011, 03:49 |
|
#6 |
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20 |
Hey Squirrel, thanks for your reply!
I agree, if you set Tf to zero, you'll get the standard TG initialization. However, your Tf dependence only occurs inside the exponential damping term, so all you would get for Tf > 0 is a damped initial condition, but not an evolution of the TG - which is highly nonlinear... What am I missing? |
|
July 19, 2011, 11:31 |
|
#7 |
New Member
Join Date: Jul 2011
Posts: 8
Rep Power: 15 |
Hi cfdnewbie,
If you take a TG with characteristic Reynolds number low enough you will have laminar TG and you can follow the evolution ... useful for code validation and stuff like that ... so yes the function give you the evolution. Cheers, |
|
July 19, 2011, 17:25 |
|
#8 |
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20 |
Hey Squirrel,
alright, that makes sense I guess... I've done some TG runs, all with a Re of 1000 and above, so I really got many many scales and transition to turbulence. I'll set up a run with Re = 10, just for fun, and check against your data... Have you done any turbulent TG calculations? I'd be willing to share some results, in case you are interested... lemme know! cheers, newbie |
|
July 19, 2011, 23:28 |
|
#9 |
New Member
Join Date: Jul 2011
Posts: 8
Rep Power: 15 |
No I never done this.
Cheers |
|
July 20, 2011, 05:52 |
|
#10 |
Senior Member
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20 |
Just an addendum for the guy who started the thread:
don't forget to compute the (incomp.) pressure from the velocity field (insert divergence into momentum eqn) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Discontinuous Galerkin schemes -- fortran source code | diedro | Main CFD Forum | 3 | March 12, 2011 11:20 |
Grid generation code in Fortran | artemiss1984 | Main CFD Forum | 3 | February 23, 2011 02:19 |
parallel fortran code | Ahmed | Main CFD Forum | 1 | October 23, 2008 08:15 |
Design Integration with CFD? | John C. Chien | Main CFD Forum | 19 | May 17, 2001 16:56 |
Multi-dimensional heat conduction fortran code | odat | Main CFD Forum | 1 | August 6, 1999 01:18 |