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

2D-Shocktube inviscid MATLAB

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 11, 2017, 02:24
Default 2D-Shocktube inviscid MATLAB
  #1
New Member
 
Ganesh kumar
Join Date: May 2013
Location: India
Posts: 15
Rep Power: 12
ganuganu is on a distinguished road
Send a message via Skype™ to ganuganu
Dear all

I was successfully able to generate and run 1D-shocktube code in MATLAB. Now I am trying to extend the same to 2D but I am facing some difficulty here.

Whenever I try to run the 2D code I am getting the following error "
*"Array dimensions must match for binary array op.

Error in laxfried1 (line 45)
w(:,2:nx-1,2:ny-1)=((w(:,3:nx,2:ny-1)+w(:,1:nx-2,2:ny-1)+w(:,2:nx-1,3:ny)+w(:,2:nx-1,1:ny-2))/4)-(dt/(2*dx)).*(F(:,3:nx,2:ny-1)-F(:,1:nx-2,2:ny-1))-..."*

Can anyone help me out where i went wrong, I am trying from my side as well. Please find attached 1D and 2D code for your reference. Thank you all.
ganuganu 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
How to start Fluent with Matlab?? Jay Hu FLUENT 8 November 9, 2022 06:30
Export/Import data contour plots with Matlab meangreen FLUENT 11 October 28, 2020 10:06
Very small Matlab job: post-processing OpenFOAM (.CSV) results RbBb CFD Freelancers 1 July 11, 2016 09:00
Live connection Matlab VS OF levka OpenFOAM Running, Solving & CFD 0 July 10, 2012 04:15
Inviscid Drag at subsonic, subcritical Mach # Axel Rohde Main CFD Forum 1 November 19, 2001 12:19


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