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

Looking for a 2-D SIMPLE code

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 11, 2020, 07:29
Smile Looking for a 2-D SIMPLE code
  #1
New Member
 
Freewill1's Avatar
 
Join Date: Aug 2014
Posts: 18
Rep Power: 11
Freewill1 is on a distinguished road
Hi,

I am looking for a SIMPLE 2-D demonstration code with following capacities:

1. 2-D lid-driven cavity and natural convection (Re value range: 1~1000)
2. based on SIMPLE algorithm
3. collocated arrangment
4. incompressible, Newtonian fluid
5. implemented using matlab

Best,
f
Freewill1 is offline   Reply With Quote

Old   June 14, 2020, 04:24
Default
  #2
Senior Member
 
Troy Snyder
Join Date: Jul 2009
Location: Akron, OH
Posts: 219
Rep Power: 18
tas38 is on a distinguished road
Quote:
Originally Posted by Freewill1 View Post
Hi,

I am looking for a SIMPLE 2-D demonstration code with following capacities:

1. 2-D lid-driven cavity and natural convection (Re value range: 1~1000)
2. based on SIMPLE algorithm
3. collocated arrangment
4. incompressible, Newtonian fluid
5. implemented using matlab

Best,
f
I do not have a matlab code to provide you.

But I do notice that you previously posted a lid-driven cavity code (written in matlab) for which you were having some difficulty.

Problematic lid-driven cavity using SIMPLE on collocated grid

I took a look at your code, and I think the issue is that you do not properly apply under-relaxation to the momentum equations. The momentum under-relaxation parameters are applied when solving the momentum equations and will therefore implictly impact the pressure-correction equation solution. They will affect the stability and convergence rates of both the momentum and pressure correction equations. See Section 6.4 in Versteeg and Malalasekera (1995 copy) for more details on this.

In your code (see link above), you apply relaxation to the u- and v-velocity components at the point at which the pressure correction equations are applied. Something like u = u^* + \alpha_u u' --> This is NOT correct. Note that in equation 6.15 in the aforementioned text that u = u^* + u'. The under-relaxation \alpha_u has already impacted the computation u^* via the momentum equations and u' via the mass imbalance (source) terms within the pressure-correction equation.

Hopefully you can get your own code working as a result of this suggestion.
tas38 is offline   Reply With Quote

Old   June 14, 2020, 08:23
Default
  #3
New Member
 
Freewill1's Avatar
 
Join Date: Aug 2014
Posts: 18
Rep Power: 11
Freewill1 is on a distinguished road
Hi Troy,

Thank you for your reply, I will try to fix the bug you find.

Best,
f
Freewill1 is offline   Reply With Quote

Old   June 17, 2020, 05:23
Smile Bug found and fixed.
  #4
New Member
 
Freewill1's Avatar
 
Join Date: Aug 2014
Posts: 18
Rep Power: 11
Freewill1 is on a distinguished road
Indeed, a worng under-relaxation method was used. Now new code with this bug fixed are available here:

Problematic lid-driven cavity using SIMPLE on collocated grid

Many thanks, Troy @tas38.
Freewill1 is offline   Reply With Quote

Reply

Tags
collocated, lid-driven cavity, natural convection, simple

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
code for SIMPLE algorithm - 2D Lid driven cavity flow problem - Collocated grid h_amooie OpenFOAM Programming & Development 1 January 22, 2022 11:33
suction force in simple code sciense Main CFD Forum 0 June 8, 2015 10:02
help!on simple method code houkensjtu Main CFD Forum 0 July 9, 2011 10:45
SIMPLE code for 3_D problem bobby Main CFD Forum 1 December 25, 2000 23:20
SIMPLE code Bivan Main CFD Forum 8 October 24, 2000 21:25


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