CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

LES initial condition

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 29, 2012, 04:59
Default
  #21
New Member
 
hava
Join Date: Aug 2012
Posts: 11
Rep Power: 13
shmhava is on a distinguished road
Dear Paolo,

Thank you for your reply, I understand.
I went through your matlab code for meshing, and to be honest with you, I have no idea where to begin. How do I implement this code in fluent? First, I have to change the file name from writemesh.m to writemesh.msh, right?
Then, what should I do with the other two codes and what do I need to change in your code in order it would fit my case file? When I read the file into fluent, it gave an error message: invalid id x. (something like that).
I so envy you that you have a group to work with. I work entirely alone.

Thank you,
Hava
shmhava is offline   Reply With Quote

Old   August 29, 2012, 05:41
Default
  #22
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Dear hava,

sorry for the lack of clearness. The files are not to be used as computational grids but are themselves a simple grid generator written in matlab, so you first need matlab to produce the grid.

All you need to do is to create a .m file with the following two calls (the files i posted were already set-up for the square channel with the sin law point distribution in the wall normal directions):

[x,y,z] = createmesh(nx,ny,nz,Lx,Ly,Lz,x0,y0,z0);
writemsh(x,y,z,file_name);

Here nx, ny and nz are the number of grid nodes (cells+1) in the three directions; Lx, Ly and Lz are the domain dimensions in the three directions and x0, y0 and z0 are the starting positions of the domain. Considering that in the files it is assumed that the stream-wise direction is x, this is the .m file i would use in your case:

file_name=mypath/mygrid.msh;
H=1;
Lx=6.4*H; Ly=H; Lz=H;
x0=0; y0=-H/2; z0=-H/2;
[x,y,z] = createmesh(97,65,65,Lx,Ly,Lz,x0,y0,z0);
writemsh(x,y,z,file_name);

Hope it is more clear now
sbaffini is offline   Reply With Quote

Old   August 29, 2012, 06:37
Default
  #23
New Member
 
hava
Join Date: Aug 2012
Posts: 11
Rep Power: 13
shmhava is on a distinguished road
sorry again, but when you say: file_name=mypath/mygrid.msh; what exactly do you mean? for example: file_name=C:\Documents and Settings\shmhava\Desktop\/mygrid.msh ? it doesn't work. Does it create a msh file or .m file?
shmhava is offline   Reply With Quote

Old   August 29, 2012, 06:42
Default
  #24
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Try simply with:

file_name='mygrid.msh'; (sorry, i forgot the single quotes)

What i wrote above (previous post) has to be written in a .m file. When it is launched in matlab (the .m files i posted, together with this one, have to be in your working directory) it will produce (in the same directory) the file mygrid.msh, which is the grid you have to use in Fluent (as it was produced by gambit).
sbaffini is offline   Reply With Quote

Old   August 29, 2012, 08:00
Default
  #25
New Member
 
hava
Join Date: Aug 2012
Posts: 11
Rep Power: 13
shmhava is on a distinguished road
Thank you so much!!!! it's working.

Now, I have one more question: How did you start your calculation? the thing I did in previous calculations was first to calculate the flow using steady k-e,realizable, enhanced wall treatment model until convergence, then I used the command "solve/initialize/init-instantaneous-vel" to produce fluctuations and then I switched the viscosity model to LES.
shmhava is offline   Reply With Quote

Old   August 29, 2012, 11:35
Default
  #26
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
That's exactly the same procedure i used too. Sometimes i had to temporarily switch to the unbounded central scheme just to avoid relaminarization in the first time instants of the flow, then i switched back to the bounded scheme.
sbaffini is offline   Reply With Quote

Old   August 29, 2012, 15:28
Default
  #27
New Member
 
hava
Join Date: Aug 2012
Posts: 11
Rep Power: 13
shmhava is on a distinguished road
Dear Paolo,

Thanks again for you help.
How do you know when your calculation has reached the statistically steady state, and then you can turn on the "data sampling for time statistics"?
shmhava is offline   Reply With Quote

Old   August 29, 2012, 16:58
Default
  #28
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
There is not unique answer on this, in the sense that different people tend to use different indicators. I usually monitor the volume average of the kinetic energy (e.g. velocity magnitude squared) over the whole domain; when it is clearly oscillating around a steady mean value then i start collecting statistics until they are, to a certain extent (also according to the personal taste), converged.
sbaffini is offline   Reply With Quote

Old   September 5, 2012, 09:50
Default
  #29
New Member
 
hava
Join Date: Aug 2012
Posts: 11
Rep Power: 13
shmhava is on a distinguished road
Dear Paolo,

I wanted to thank you a lot for your help. My simulation now works much better than my previous ones (although, I get skin friction coefficient smaller than expected from the literature by 6-7%). Now, I added heat transfer to the problem, and I get Nusselt number of 11% smaller than the value predicted from a known correlation. Do you have any suggestions of how to improve my results?

Thanks again,
Hava
shmhava is offline   Reply With Quote

Old   September 6, 2012, 04:17
Default
  #30
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Dear hava,

compared to the skin friction value you cited before, i got a 5% error which is comparable to your results. The difference may probably be due to the statistical difference in the samples used for the statistics (including, maybe, the total number of time steps used).

Initially we also had the idea to include heat transfer in our calculations but, as we were more concerned on several other effects, we didn't to save computational time. I have a very limited experience with heat transfer and LES in Fluent, it being limited to the case of bluff body flows (where the near wall small scale phenomena are much less important than in straight channels/ducts).

I can suggest the use of a dynamic model for the turbulent heat flux modelling and, if available, the comparison with a DNS reference instead of a correlation (or experimental data in general, whose uncertainties have to be carefully considered).

More generally, an 11% discrepancy might not be that bad.
sbaffini is offline   Reply With Quote

Reply


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
Forces in OF15 richard OpenFOAM Running, Solving & CFD 180 July 9, 2018 10:54
SLTS+rhoPisoFoam: what is rDeltaT??? nileshjrane OpenFOAM Running, Solving & CFD 4 February 25, 2013 04:13
MRFSimpleFOAM goes divergenced! renyun0511 OpenFOAM Running, Solving & CFD 0 November 19, 2009 02:11
ForcesCoeffs ronaldo OpenFOAM 4 September 14, 2009 07:11
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 11:16


All times are GMT -4. The time now is 00:28.