CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

Second order upwind problem

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

Like Tree11Likes
  • 1 Post By shardiali
  • 2 Post By cdegroot
  • 1 Post By shardiali
  • 2 Post By flotus1
  • 1 Post By Ford Prefect
  • 1 Post By shardiali
  • 1 Post By flotus1
  • 1 Post By cdegroot
  • 1 Post By flotus1

Reply
 
LinkBack Thread Tools Display Modes
Old   October 26, 2012, 04:49
Default Second order upwind problem
  #1
New Member
 
Alireza Shardi
Join Date: Oct 2012
Posts: 17
Rep Power: 4
shardiali is on a distinguished road
Dear friends,

I am simulating the laminar convection, conjugate heat transfer in a microchannel and I am a new user of the Cadalyzer software. I have deep doubts about the method that I am using now. I have done a simulation with upwind scheme for all parameters and with 1000 iterations I got a good convergence for all parameters. However I have noticed first order upwind scheme is not really trustable in convection heat tranfer(right??!) and I changed my enthalpy scheme to second order and pooof! the computational cost increased to 100 hours! which is really high. what should I do!? stick with upwind or do sth like coarser mesh, less iteration,..to decrease the calcualtion time!? Please help me I am a beginner and need your kind help,

Info:
Mesh grid : 1.3 million
relaxation: slow convergence for enthalpy , rather fast for flow
bharatesh likes this.
shardiali is offline   Reply With Quote

Old   October 26, 2012, 12:23
Default
  #2
Senior Member
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 387
Rep Power: 6
cdegroot is on a distinguished road
First order methods do generally converge better than higher order methods for several reasons (more dissipative, higher order terms tend to bounce around between iterations, etc). If you want an accurate solution you should use a second order method.

Some things to address though. Does your mesh need to be 1.3 million elements? You should always start with a coarse mesh and refine until you see the solution isn't changing much. Also, energy equations can sometimes take longer to converge because they involve longer timescales. I don't know about the software you are using, but does it use a time step or some type of under-relaxation to progress from iteration to iteration? Either way you should play with those parameters to see if you can accelerate convergence. If it uses time stepping, you can probably try increasing it to speed up convergence as long as the solution is still stable (doesn't diverge).
shardiali and bharatesh like this.
cdegroot is offline   Reply With Quote

Old   October 29, 2012, 04:28
Default
  #3
New Member
 
Alireza Shardi
Join Date: Oct 2012
Posts: 17
Rep Power: 4
shardiali is on a distinguished road
Dear Cdegroot,

Thanks for the reply. My software uses under relaxation parameters and I can get a faster convergence by changing the relaxation parameteres specially for the energy equation but I wonder if it affects my results since I curb the solver to small changes in every iteration. Moreover, what you mean by "If you want an accurate solution you should use a second order method." is that I should use the second order for all parameters (P,T,H,..) or just for the enthalpy? I think using second order for all parameters will increase the computational time to one week or so! , I am not 100% sure! but I think what you mean by making the mesh finer gradually and see the changes in the results, is that I have to start the simulation from the beginning for each refined mesh grid to investigate the independence. Am I right?
Sorry for being a naive! and again thank you.
bharatesh likes this.
shardiali is offline   Reply With Quote

Old   October 29, 2012, 07:47
Default
  #4
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,097
Rep Power: 19
flotus1 will become famous soon enoughflotus1 will become famous soon enough
Normally, higher order methods should not increase the computational cost drastically. If this happens in your simulation, these are rather stability issues.

Changing the under relaxation factors should not alter the final solution, provided that the solution is converged.

And yes, checking for mesh independency is usually done starting from a coarse grid.
shardiali and bharatesh like this.
flotus1 is offline   Reply With Quote

Old   October 29, 2012, 08:02
Default
  #5
Member
 
Ford Prefect's Avatar
 
Join Date: Mar 2009
Posts: 72
Rep Power: 8
Ford Prefect is on a distinguished road
Quote:
Originally Posted by shardiali View Post
Dear Cdegroot,

Thanks for the reply. My software uses under relaxation parameters and I can get a faster convergence by changing the relaxation parameteres specially for the energy equation but I wonder if it affects my results since I curb the solver to small changes in every iteration. Moreover, what you mean by "If you want an accurate solution you should use a second order method." is that I should use the second order for all parameters (P,T,H,..) or just for the enthalpy? I think using second order for all parameters will increase the computational time to one week or so! , I am not 100% sure! but I think what you mean by making the mesh finer gradually and see the changes in the results, is that I have to start the simulation from the beginning for each refined mesh grid to investigate the independence. Am I right?
Sorry for being a naive! and again thank you.
The converged results should be similar regardless of your under-relaxation parameter. However it might need (a lot) more iterations to reach the same residual level. Regarding the order of discretization, sometimes the system uncertainty as well as the model uncertainty (turbulence models) might be larger than the error caused by numerical dissipation. So just by setting the discretization to second order does not mean you get an accurate solution.
bharatesh likes this.
__________________
"Trying is the first step to failure." - Homer Simpson
Ford Prefect is offline   Reply With Quote

Old   October 29, 2012, 08:25
Default
  #6
New Member
 
Alireza Shardi
Join Date: Oct 2012
Posts: 17
Rep Power: 4
shardiali is on a distinguished road
Quote:
Originally Posted by flotus1 View Post
Normally, higher order methods should not increase the computational cost drastically. If this happens in your simulation, these are rather stability issues.

Changing the under relaxation factors should not alter the final solution, provided that the solution is converged.

And yes, checking for mesh independency is usually done starting from a coarse grid.
Dear folk,

It does happen in my simulation and if this very huge difference in computational time between first order and second order is not normal, what steps would you suggest me to find the problem in my simulation? it is a steady state, conjugated heat transfer(fluid/solid in a microchannel), laminar convection. Merci.
bharatesh likes this.
shardiali is offline   Reply With Quote

Old   October 29, 2012, 08:31
Default
  #7
New Member
 
Alireza Shardi
Join Date: Oct 2012
Posts: 17
Rep Power: 4
shardiali is on a distinguished road
[QUOTE=Ford Prefect;389066]The converged results should be similar regardless of your under-relaxation parameter. However it might need (a lot) more iterations to reach the same residual level.


That is a good point to know. Thankx.
shardiali is offline   Reply With Quote

Old   October 29, 2012, 08:45
Default
  #8
Senior Member
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 387
Rep Power: 6
cdegroot is on a distinguished road
Quote:
Originally Posted by shardiali View Post
Dear Cdegroot,

Thanks for the reply. My software uses under relaxation parameters and I can get a faster convergence by changing the relaxation parameters specially for the energy equation but I wonder if it affects my results since I curb the solver to small changes in every iteration. Moreover, what you mean by "If you want an accurate solution you should use a second order method." is that I should use the second order for all parameters (P,T,H,..) or just for the enthalpy? I think using second order for all parameters will increase the computational time to one week or so! , I am not 100% sure! but I think what you mean by making the mesh finer gradually and see the changes in the results, is that I have to start the simulation from the beginning for each refined mesh grid to investigate the independence. Am I right?
Sorry for being a naive! and again thank you.
Although you might need to apply a lot of relaxation in the beginning to avoid divergence, this might be part of the reason you are experiencing convergence issues. Try using less relaxation to see if this speeds up convergence without causing numerical instabilities. In general you should use second order methods for all equations for accuracy, but as someone else pointed out, this does not guarantee accuracy.

With regards to the long computational time: you are using a pretty big grid without having shown that it is necessary. One of the first steps in running CFD calculations is a grid sensitivity study. Basically, start with a coarse grid and run through the full calculation. Then (approximately) double the number of control volumes until you are satisfied that the grid density is not affecting the results. To be honest, I think your problem does not sound overly complex, so I think your grid is most likely much finer than it needs to be.

On the topic of grids, make sure your grid has decent quality because this can impact convergence as well.
cdegroot is offline   Reply With Quote

Old   October 29, 2012, 09:01
Default
  #9
New Member
 
Alireza Shardi
Join Date: Oct 2012
Posts: 17
Rep Power: 4
shardiali is on a distinguished road
Basically, start with a coarse grid and run through the full calculation. Then (approximately) double the number of control volumes until you are satisfied that the grid density is not affecting the results.

that was so helpful. I will try what you said and hopefully this resolves my problem. I dont have access to the software now but I will surely update you ASAP. Thank you buddy. Still eager to hear other's ideas.

Ali
shardiali is offline   Reply With Quote

Old   October 29, 2012, 09:03
Default
  #10
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,097
Rep Power: 19
flotus1 will become famous soon enoughflotus1 will become famous soon enough
Quote:
Originally Posted by shardiali View Post
Dear folk,

It does happen in my simulation and if this very huge difference in computational time between first order and second order is not normal, what steps would you suggest me to find the problem in my simulation? it is a steady state, conjugated heat transfer(fluid/solid in a microchannel), laminar convection. Merci.
I would suggest you solve the flow field with first order accuracy and use the final solution as an initial condition for the higher order solution. This can suppress stability issues.
The point with mesh quality already mentioned here is also important. If it is low, higher order schemes are more likely to cause stability problems.
shardiali likes this.
flotus1 is offline   Reply With Quote

Old   October 29, 2012, 09:24
Default
  #11
New Member
 
Alireza Shardi
Join Date: Oct 2012
Posts: 17
Rep Power: 4
shardiali is on a distinguished road
Quote:
Originally Posted by flotus1 View Post
I would suggest you solve the flow field with first order accuracy and use the final solution as an initial condition for the higher order solution. This can suppress stability issues.
The point with mesh quality already mentioned here is also important. If it is low, higher order schemes are more likely to cause stability problems.
This sounds pretty nice, but there are some issues I am thinking about:
1-is this as accurate as the second order scheme? (when you use it from the beginning)
2-would it be possible to get divergence in the second part of your calculation (using the second order after first order) after reaching the convergence in the first part!?
3- would it be the case that the second part of calculation does not change your results much? ( not much of increase in the accuracy)

Thank you for the info,
shardiali is offline   Reply With Quote

Old   October 29, 2012, 09:37
Default
  #12
Senior Member
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 387
Rep Power: 6
cdegroot is on a distinguished road
There should be practically no difference between running a second order calculation from the beginning versus using first order data as an initial guess. You are just giving it a better initial guess.

Divergence could still occur. You'll have to play with the relaxation factors to make sure it doesn't.

If the second order corrections are small, the result won't change much. That depends on both the grid and your flow field. In general though I think the changes should be noticeable.
shardiali likes this.
cdegroot is offline   Reply With Quote

Old   October 29, 2012, 10:31
Default
  #13
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,097
Rep Power: 19
flotus1 will become famous soon enoughflotus1 will become famous soon enough
Quote:
Originally Posted by shardiali View Post
This sounds pretty nice, but there are some issues I am thinking about:
1-is this as accurate as the second order scheme? (when you use it from the beginning)
2-would it be possible to get divergence in the second part of your calculation (using the second order after first order) after reaching the convergence in the first part!?
3- would it be the case that the second part of calculation does not change your results much? ( not much of increase in the accuracy)

Thank you for the info,
1) The final solution is independent of the initial conditions. Thus the solution will be the same as on obtained with higher order schemes from the beginning.
2) Divergence can still occur. with the method described, you only improve the initial conditions, which improves stability. There can still be other issues (e.g. mesh quality) that cause the solution to diverge.
3) Dont understand the question exactly
shardiali likes this.
flotus1 is offline   Reply With Quote

Old   October 31, 2012, 05:53
Default
  #14
New Member
 
Alireza Shardi
Join Date: Oct 2012
Posts: 17
Rep Power: 4
shardiali is on a distinguished road
Quote:
Originally Posted by flotus1 View Post
1) The final solution is independent of the initial conditions. Thus the solution will be the same as on obtained with higher order schemes from the beginning.
2) Divergence can still occur. with the method described, you only improve the initial conditions, which improves stability. There can still be other issues (e.g. mesh quality) that cause the solution to diverge.
3) Dont understand the question exactly
Merci. I almost got my answers. I am still trying to implement what I have learned. Thank you all folks. I will let you know about the results.
Ali
shardiali is offline   Reply With Quote

Old   November 8, 2012, 23:22
Default microchannel
  #15
New Member
 
Ayoub
Join Date: Nov 2012
Posts: 7
Rep Power: 4
AYOUB is on a distinguished road
Hi
I am studying roughness in microchannel, but I have problem for thermall fully developed. would you pleas help me?
AYOUB is offline   Reply With Quote

Old   November 8, 2012, 23:41
Default
  #16
Senior Member
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 387
Rep Power: 6
cdegroot is on a distinguished road
Start a new thread and state a more specific question and I'm sure you will get some help.
cdegroot is offline   Reply With Quote

Old   November 8, 2012, 23:56
Default fully developed
  #17
New Member
 
Ayoub
Join Date: Nov 2012
Posts: 7
Rep Power: 4
AYOUB is on a distinguished road
Thank you
I want to study roughness in microchannel 2D
D=100microchannel,L=1mm,working fluid is water,q for wall is constant,Tin=293
I can not reach to fully develop(thermally)
would you pleas help me?
AYOUB is offline   Reply With Quote

Old   November 9, 2012, 00:01
Default
  #18
Senior Member
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 387
Rep Power: 6
cdegroot is on a distinguished road
This has nothing to do with second order upwind schemes. Start a new discussion.
cdegroot is offline   Reply With Quote

Old   November 9, 2012, 04:04
Default
  #19
New Member
 
Alireza Shardi
Join Date: Oct 2012
Posts: 17
Rep Power: 4
shardiali is on a distinguished road
Quote:
Originally Posted by shardiali View Post
Merci. I almost got my answers. I am still trying to implement what I have learned. Thank you all folks. I will let you know about the results.
Ali
Dear fellows,
I ran my simulation with upwind and compared to those of second order. I saw no sizable differences in my results and considering the very long computational time, I've decided to continue with the first order scheme. I deeply appreciate your answers that helped me a lot.
Success.
Ali
shardiali is offline   Reply With Quote

Reply

Tags
computational time, conjugate heat transfer, microchannel, second order upwind

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula for 2nd order upwind scheme for non-uniform grids? quarkz Main CFD Forum 2 August 30, 2012 17:25
Quasi Second Order Upwind (QSOU) Scheme Orco Main CFD Forum 0 November 20, 2007 12:07
weno upwind 5th order 1 d code Chi Main CFD Forum 1 March 11, 2007 23:44
First order upwind leung FLUENT 2 June 13, 2004 08:09
First Order Upwind Giovanni Ieria FLUENT 3 November 30, 1999 19:43


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