|
[Sponsors] |
Help regarding 1D compressible flow (Sod Shock tube) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 25, 2022, 06:27 |
|
#21 |
New Member
Poly T
Join Date: May 2022
Posts: 24
Rep Power: 3 |
the only correct response to „i need your codes“ is: I need your money.
|
|
August 25, 2022, 11:04 |
|
#22 |
New Member
javeria
Join Date: Aug 2022
Posts: 21
Rep Power: 4 |
how much money🤔
|
|
August 25, 2022, 17:26 |
|
#23 |
New Member
Poly T
Join Date: May 2022
Posts: 24
Rep Power: 3 |
I hope you realize this was a joke. Is this a homework problem?
|
|
August 25, 2022, 17:53 |
|
#24 |
New Member
javeria
Join Date: Aug 2022
Posts: 21
Rep Power: 4 |
no this is not my homework and I ask for help..
|
|
August 25, 2022, 18:00 |
|
#25 |
New Member
Poly T
Join Date: May 2022
Posts: 24
Rep Power: 3 |
well, post your code and we can have a look
|
|
August 25, 2022, 18:02 |
|
#26 |
New Member
javeria
Join Date: Aug 2022
Posts: 21
Rep Power: 4 |
I haven't any idea about high resolution scheme that how I do coding for it in MATLAB
|
|
August 25, 2022, 18:06 |
|
#27 |
New Member
Poly T
Join Date: May 2022
Posts: 24
Rep Power: 3 |
Then why do you want to code it ? First read up on the theory.
|
|
August 25, 2022, 18:07 |
|
#28 |
New Member
javeria
Join Date: Aug 2022
Posts: 21
Rep Power: 4 |
I read the literature but my coding is not too much strong
|
|
August 26, 2022, 01:19 |
|
#29 |
New Member
Poly T
Join Date: May 2022
Posts: 24
Rep Power: 3 |
then you should start with a simpler task. Show your work and we might help, but do not expect us to do the work for you.
|
|
August 26, 2022, 17:21 |
|
#30 |
New Member
javeria
Join Date: Aug 2022
Posts: 21
Rep Power: 4 |
ok sure I will share my code
|
|
August 27, 2022, 07:42 |
|
#31 |
New Member
javeria
Join Date: Aug 2022
Posts: 21
Rep Power: 4 |
clear all;
close all; clc; R=287; %Cv=717; gamma=1.4; rhol=1; Ul=0; Pl=100000; rhor=0.125; Ur=0; Pr=10000; c=50; delx=20/c; delt=.0004278; lambda=.001069; for i=1:1:c+1 x(i)=-10+(i-1)*delx; end for i=1:1:c+1 if (x(i)<0) rho(1,i)=rhol; u(1,i)=Ul; p(1,i)=Pl; else rho(1,i)=rhor; u(1,i)=Ur; p(1,i)=Pr; end end for i=1:1:c+1 mom(1,i)=rho(1,i)*u(1,i); %t(1,i)=p(1,i)/(rho(1,i)*R); e(1,i)=p(1,i)/((gamma-1)*rho(1,i)); energ(1,i)=(e(1,i)+.5*u(1,i)^2); energrho(1,i)=energ(1,i)*rho(1,i); end for n=2:1:30 for i=2:1:c rho(n,i)= .5*(rho(n-1,i-1)+ rho(n-1,i+1))-.5*lambda*(u(n-1,i+1)*rho(n-1,i+1)-u(n-1,i-1)*rho(n-1,i-1)); mom(n,i)= .5*(mom(n-1,i-1)+ mom(n-1,i+1))-.5*lambda*(u(n-1,i+1)*mom(n-1,i+1)+p(n-1,i+1)-p(n-1,i-1)-u(n-1,i-1)*mom(n-1,i-1)); energrho(n,i)= .5*(energrho(n-1,i-1)+energrho(n-1,i+1))-.5*lambda*((u(n-1,i+1)*energrho(n-1,i+1)+p(n-1,i+1)*u(n-1,i+1) - u(n-1,i-1)*energrho(n-1,i-1)+p(n-1,i-1)*u(n-1,i-1))); energ(n,i)=energrho(n,i)/rho(n,i); u(n,i)=mom(n,i)/rho(n,i); e(n,i)=energ(n,i)-.5*u(n,i)^2; %t(n,i)=e(n,i)/Cv; p(n,i)=(gamma-1)*rho(n,i)*e(n,i); end rho(n,1)=rho(1,1); rho(n,c+1)=rho(1,c+1); mom(n,1)=mom(1,1); mom(n,c+1)=mom(1,c+1); e(n,1)=e(1,1); e(n,c+1)=e(1,c+1); %t(n,1)=t(n,2); %t(n,1)=e(n,1)/Cv; %t(n,c+1)=t(n,c); %t(n,c+1)=e(n,c+1)/Cv; p(n,1)=p(1,1); %p(n,1)=rho(n,1)*R*t(n,1); p(n,c+1)=p(1,c+1); %p(n,c+1)=rho(n,c+1)*R*t(n,c+1); u(n,1)=u(1,1); %u(n,1)=mom(n,1)/rho(n,1); u(n,c+1)=u(1,c+1); %u(n,c+1)=mom(n,c+1)/rho(n,c+1); end t=plot(x,p(30,,'or'); axis([-10 10 0 100000]) t=plot(x,u(30,,'or'); axis([-10 10 -150 450]) t=plot(x,rho(25,,'or'); axis([-10 10 0 1.1]) |
|
August 27, 2022, 07:43 |
|
#32 |
New Member
javeria
Join Date: Aug 2022
Posts: 21
Rep Power: 4 |
i need the pressure, velocity and density plot but in this code not generate
|
|
August 27, 2022, 07:57 |
|
#33 |
New Member
javeria
Join Date: Aug 2022
Posts: 21
Rep Power: 4 |
and second this one
|
|
August 27, 2022, 08:54 |
|
#34 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,897
Rep Power: 73 |
||
August 27, 2022, 16:25 |
|
#35 |
New Member
javeria
Join Date: Aug 2022
Posts: 21
Rep Power: 4 |
i do not understand the python.. matlab please
|
|
August 27, 2022, 16:36 |
|
#36 |
New Member
Poly T
Join Date: May 2022
Posts: 24
Rep Power: 3 |
Honestly, dude, if you cannot figure out how to translate python into matlab or vice versa, you should stop trying to write cfd codes. No one here will spoon feed you. Stop this or put serious work into it. You come across as a whiny high school kid who wants others to do the homework for him. If you have a direct question, ask - but stop trying to leech.
|
|
August 29, 2022, 05:47 |
|
#37 |
New Member
javeria
Join Date: Aug 2022
Posts: 21
Rep Power: 4 |
I just asked for help so why you mind it. I am stuck I used maacormack, laxwendroff and roe's scheme. Now i need some other scheme to compare the results and submit my thesis. If you are not helping me ignore.
|
|
August 29, 2022, 05:49 |
|
#38 |
New Member
Poly T
Join Date: May 2022
Posts: 24
Rep Power: 3 |
I mind because you are not asking for help. You are asking „solve my problems for me because I am too lazy to even formulate a meaningful question“.
|
|
August 29, 2022, 05:52 |
|
#39 |
New Member
javeria
Join Date: Aug 2022
Posts: 21
Rep Power: 4 |
I asked to share someone matlab codes then i will make changes in it according to my problem
|
|
August 29, 2022, 05:57 |
|
#40 |
New Member
javeria
Join Date: Aug 2022
Posts: 21
Rep Power: 4 |
so please if someone can help me let me know. Because i will have submit my thesis also by tomorrow
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Issues on the simulation of high-speed compressible flow within turbomachinery | dowlee | OpenFOAM Running, Solving & CFD | 11 | August 6, 2021 07:40 |
Compressible Flow Pressure Outlet Back Flow | okstatecheme | OpenFOAM Running, Solving & CFD | 1 | March 21, 2018 09:11 |
rhoCentralFoam not reflecting shock in Shock Tube? | Astaria | OpenFOAM Running, Solving & CFD | 5 | March 4, 2012 04:07 |
compressible flow | maria teresa | FLUENT | 1 | September 7, 2007 17:58 |
Inviscid Drag at subsonic, subcritical Mach # | Axel Rohde | Main CFD Forum | 1 | November 19, 2001 13:19 |