CAPITULO II MARCO DE REFERENCIA
2.3 SOCIEDAD MINERA CERRO VERDE S.A.A
--Set individual attributes of globel date project.
config.title = " Simulation of Shock / Shock Interactions Interactions. "
print( config.title )
--Testing with the heattransfer -- THE GAS MODEL
--set gas model
nsp , nmodes = setGasModel ('perfect - air.lua ')
--nsp , nmodes = setGasModel ('ideal -air -gas - model.lua ')
print(" GasModel set to perfect air. nsp= ", nsp , " nmodes = ", nmodes )
p_inf =5 .9 T_inf =52 .5 M_inf =10 D_nozzle =0 .2 Re =1 .66e5 mu =3 .405e -6 Tw =300
--Verify simulation conditions
inflowtest = FlowState :new{p=p_inf , velx =0, T= T_inf } Q= inflowtest : toTable ()
U_inf = M_inf *Q.a
inflow = FlowState :new{p=p_inf , velx=U_inf , T= T_inf }
print(" p_inf =", p_inf ,"T=", T_inf ," M_inf =",M_inf ) print(" D_nozzle =",D_nozzle ," P_stag =",P_s , "Re=",Re) print("mu=",mu ," U_inf =",U_inf ,"rho=",Q.rho )
-- Oldsolution user
local useOldSoln = false
config.dimensions = 2
local oldSoln_jobName = 'ISS '
local oldSoln_dir = '../ Space_station_2 ' local oldSoln_tindx = 40 --
local oldSoln_nblocks = 48 local SameGrid = false local initial
if SameGrid then
cell = fsol : find_enclosing_cell {x=x, y=y}
else
cell = fsol : find_nearest_cell_centre {x=x, y=y}
end
print(" Have a cup of coffee ")
cell.fmt = " FlowState "
dummyFS : fromTable ( fsol : get_cell_data ( cell ))
r et u r n dummyFS end
end
print(" check6 ")
--Distances and angles
-- Importent angles and distances -- L3 =0 .100 alpha =10/360*2*m a t h . p i L1=L3 /2/m a t h . c o s( alpha ) L2=L1 L=0 .102 span =0 .1 beta =20/360*2*m a t h . p i h1 =0 .053 h2 =0 .035635 Dc =0 .016 K=2 .5 P=1 .5 alpha =(90 -20)/360*2*m a t h . p i cx =0+ Dc/2-Dc /2*K*m a t h . s i n(1/4*m a t h . p i) cy=-Dc /2*K*m a t h . c o s(1/4*m a t h . p i)
Factor1x =1 -- Factor patch0 x direction Factor2x =1 -- Factor patch1 x direction Factorr =1 Factora =1 N=8 topy =0 .03 bottemy =-0 .025 -- Coordinates
a = Vector3 :new{x=-L, y=-h1}
b = Vector3 :new{x=-L+L1*m a t h . c o s( beta),y=-h1+L1*m a t h . s i n( beta )}
c = Vector3 :new{x=0, y=-0 .02}
d = Vector3 :new{x=0+ Dc/2-Dc /2*P*m a t h . s i n(1/4*m a t h . p i), y=-Dc /2*P*m a t h . c o s(1
/4*m a t h . p i)}
e = Vector3 :new{x=0+ Dc/2, y=0} f = Vector3 :new{x=0+ Dc/2, y=Dc /2*P} g = Vector3 :new{x=0+ Dc/2, y= topy} h = Vector3 :new{x=-0 .0085 , y=0}
i = Vector3 :new{x=-L+L1*m a t h . c o s( beta)-Dc*m a t h . c o s( alpha ),
j = Vector3 :new{x=-L, y=-h1+Dc}
k = Vector3 :new{x=0+ Dc/2-Dc /2*P, y=0} l = Vector3 :new{x=0+ Dc/2, y=-Dc /2*P} m = Vector3 :new{x=0+ Dc/2, y= bottemy }
n = Vector3 :new{x=-L+L1*m a t h . c o s(beta )+ Dc*2,y=-h1+L1*m a t h . s i n( beta )}
o = Vector3 :new{x=0+ Dc/2, y=-Dc /2} q = Vector3 :new{x=0+ Dc/2-Dc/2, y=0} r = Vector3 :new{x=0+ Dc/2, y=Dc /2}
p = Vector3 :new{x=0+ Dc/2-Dc /2*m a t h . s i n(1/4*m a t h . p i), y=-Dc /2*m a t h . c o s(1
/4*m a t h . p i)}
s = Vector3 :new{x=-L-Dc , y=-h1} t = Vector3 :new{x=-L-Dc , y=-h1+Dc}
u = Vector3 :new{x=h.x+-h.x -0 .008 , y=h.y +0 .015} v = Vector3 :new{x=h.x+-h.x -0 .006 , y=h.y -0 .015 } --Lines
ja= Line :new{p0=j, p1=a} ib= Line :new{p0=i, p1=b} ji= Line :new{p0=j, p1=i} ab= Line :new{p0=a, p1=b} ih= Line :new{p0=i, p1=h} bm= Line :new{p0=b, p1=m} mo= Line :new{p0=m, p1=o} hq= Line :new{p0=h, p1=q} gr= Line :new{p0=g, p1=r} --arcs
arcqo =Arc:new{p0=q,p1=o, centre =e} arcrq =Arc:new{p0=r,p1=q, centre =e} --Curves
curvehm = Bezier :new{ points ={h,v,m}} curvegh = Bezier :new{ points ={g,u,h}} --patches
quad0 = makePatch { south =ja , north =ib ,west =ji ,east =ab} quad1 = makePatch { south =ib , north =curvehm ,west =ih , east =bm} quad2 = makePatch { south =curvehm , north =arcqo ,west =hq ,east =mo} quad3 = makePatch { south =curvegh , north =arcrq ,west =gr ,east =hq}
--Grid0
nx1=na1* Factor1x
grid0 = StructuredGrid :new{ psurface =quad0 , niv=na1*N+1, njv=nx1*N+1, cfList = { north =rcfR2 , south =rcfR2 , west =rcfL ,east=rcfL }}
--grid1
nx2 =10* Factor2x
grid1 = StructuredGrid :new{ psurface =quad1 , niv=na1*N+1, njv=nx2*N+1, cfList = { west=rcfR , east =rcfR , south = rcfR2 }}
--grid2
nr1=na1* Factorr
grid2 = StructuredGrid :new{ psurface =quad2 , niv=na1*N+1, njv=nr1*N+1, cfList ={}}
--grid3
na2=na1* Factora
grid3 = StructuredGrid :new{ psurface =quad3 , niv=na2*N+1, njv=nr1*N+1, cfList ={}}
totalcells =na2*nr1*N^2+ nr1*na1*N^2+ na1*nx2*N^2+ na1*nx1*N^2
print(" totalcells =",totalcells )
config.compute_loads = true
--Blocks
blk0 = FluidBlockArray {grid =grid0 , fillCondition =inflow ,nib =3, njb =4, bcList = { west = InFlowBC_Supersonic :new{ flowCondition = inflow }, south = InFlowBC_Supersoni c:new{ flowCondition = inflow }, east= WallBC_NoSlip_FixedT :new{ Twall =Tw }}}
blk1 = FluidBlockArray {grid =grid1 , fillCondition =inflow ,nib =3, njb =4, bcList = { west = InFlowBC_Supersonic :new{ flowCondition = inflow },east = OutFlowBC_Simple :ne w{ xOrder =0}}}
blk2 = FluidBlockArray {grid =grid2 , fillCondition =inflow ,nib =3, njb =4, bcList = { north = WallBC_NoSlip_FixedT :new{ Twall =Tw , group ='cyl -
loads '}, east = OutFlowBC_Simple :new{ xOrder =0}}}
blk3 = FluidBlockArray {grid =grid3 , fillCondition =inflow ,nib =3, njb =4, bcList = { north = WallBC_NoSlip_FixedT :new{ Twall =Tw},west= OutFlowBC_Simple :new{ xOrder =0 }, south = InFlowBC_Supersonic :new{ flowCondition = inflow }}}
identifyBlockConnections () --for i=1 ,# fluidBlocks do
-- SBlock2UBlock ( fluidBlocks [i]) --end setHistoryPoint {x=-0.004 ,y=0,z=0 .0} setHistoryPoint {x=0.00 ,y=-0.008 ,z=0 .0} setHistoryPoint {x=-0,y=-0.004 ,z=0 .0} --Setup config.gasdynamic_update_scheme = " euler " config.flux_calculator = " adaptive " config.viscous = true viscous_signal_factor =1 config.cfl_value = 0.3
config.max_time =150*10^( -6) config.max_step = 2000000 config.dt_init = 1.0e -10 config.dt_plot = config.max_time /40 config.dt_loads = config.max_time /40 config.dt_history = config.max_time /40