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

mesh size & urf SIMPLE FVM MATLAB

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 14, 2012, 09:52
Default mesh size & urf SIMPLE FVM MATLAB
  #1
Member
 
Michael Moor
Join Date: May 2012
Location: Ireland
Posts: 30
Rep Power: 14
michaelmoor.aero is on a distinguished road
Hello everyone,
I have developed a laminar 2D solver for Poiseulle flow using FVM and SIMPLE, and the results match nicely to the Hagen-Poiseulle velocity profile, but if i increase the mesh size, the solution blows up... My results are coming out nicely, but i cannot seem to be able to increase the mesh size beyond 36*36... I have to decrease the pressure under-relaxation to 0.01 to get it to iterate, but then it just oscillates at a continuity residual of around e-2... do you know the reason for this and why it happens? or how to fix it?

I am trying to maybe implement a method such that:
if MassResidual <= 10^-2
alphap = 0.05
disp('alphap is now 0.1')
end
if MassResidual <= 10^-3
alphap = 0.1
disp('alphap is now 0.3')
end

in an effort to try and march the process along? is this a correct approach?

I am also solving the equations using Jacobi:
kk=1;
ip=0;
while kk<=200;

pcheck = pdash;
%for i=2:nXp-1;
%for j=2:nYp-1;
%pdash(i,j)=(bdash(i,j)+saE(i,j)*pdash(i+1,j)+saW( i,j)*pdash(i-1,j)+saN(i,j)*pdash(i,j+1)+saS(i,j)*pdash(i,j-1))/saP(i,j);
%end
%end
kk=kk+1 ;
mx = max(max(max(abs(pcheck-pdash))));
ip=ip+1;
if (kk>50&&mx<10^-6), break, end
end

and for residuals:
MassResidual=0.0;
for i=2:nXp-1;
for j=2:nYp-1;
MassResidual=max([MassResidual abs(bdash(i,j))]);
end
end
MassResidual=abs(MassResidual);

I'd appreciate any assistance!

Best Regards,
Michael
0565113@gmail.com
michaelmoor.aero is offline   Reply With Quote

Old   August 14, 2012, 11:12
Default
  #2
Member
 
Michael Moor
Join Date: May 2012
Location: Ireland
Posts: 30
Rep Power: 14
michaelmoor.aero is on a distinguished road
Apologies, I did not add all of the relevant information...

This is the momentum equation that i solve for, including under-relaxation:
kk=1;
while kk<=100;
%Solve iteratively using the Jacobi Method to yield u, which will now
%be the most up to date value, i.e. u*
for i=3:nX-1;
for j=2:nYp-1;
u(i,j)=((biJ(i,j)+uaE(i,j)*u(i+1,j)+uaW(i,j)*u(i-1,j)+uaN(i,j)*u(i,j+1)+uaS(i,j)*u(i,j-1) + (1-alphau)*uaP(i,j)*u(i,j)/alphau))*alphau/uaP(i,j);
end
end
kk=kk+1; % Counter
end

and i correct the pressure with under-relaxation:
%% Correct the Pressure, including under-relaxation

pnew(2:nXp,2:nYp-1) = pstar(2:nXp,2:nYp-1) + alphap*pdash(2:nXp,2:nYp-1);
michaelmoor.aero is offline   Reply With Quote

Reply

Tags
finite volume method, mesh sizing, residuals, simple, under relaxation factors


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
[snappyHexMesh] Layers:problem with curvature giulio.topazio OpenFOAM Meshing & Mesh Conversion 10 August 22, 2012 10:03
Proof reading matlab code for SIMPLE and FVM michaelmoor.aero Main CFD Forum 0 July 3, 2012 17:06
unstructure mesh size control near to wall using gambit lalit kumar FLUENT 4 July 6, 2010 16:13
Mesh size for particulate flow simulations Shahri Main CFD Forum 0 March 24, 2009 18:40
Guides for calculation of mesh size for combustion Luk CFX 4 March 17, 2008 03:34


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