Commit 3e3867e6 authored by Amira Abdel-Rahman's avatar Amira Abdel-Rahman
Browse files

small change 3d lbm

parent 95c512a7
Pipeline #12127 passed with stage
in 26 seconds
This diff is collapsed.
This diff is collapsed.
......@@ -178,7 +178,7 @@ setup["loads"]=[];
sc=0.0
if t==1
sc=0.001
sc=0.0005
end
for e in edgeList
load2=Dict()
......@@ -223,7 +223,7 @@ function externalForce(currentTimeStep,N_position,N_currentPosition,N_force)
edgeList=findall(x->x!=0,presD)
sc=0.01
sc=0.0005
loadX=0
loadY=0
loadZ=0
......
......@@ -1089,7 +1089,7 @@ function display3D(UX,UY,UZ,BOUND,ts=1)
# cam.eyeposition[] = Float32[0., 1., 0.]
# minimum(res3d)
# sc=volume!(res3d, algorithm = :absorption ,transparency=true,colorrange=(0, maximum(res3d)),backgroundcolor = "#000000",colormap=:jet)
sc=volume!(BOUND, algorithm = :iso, isorange = 1.0, isovalue = 1.0)
sc=volume!(BOUND, algorithm = :iso, isorange = 1.0, isovalue = 1.0,colorrange=(0, 2))
sc=volume!(res3d, algorithm = :absorption ,transparency=true,colorrange=(0, maximum(res3d)),backgroundcolor = "#FFFFFF",colormap=:jet)
# sc=volume!(res3d, algorithm = :absorption ,transparency=true,colorrange=(0, 0.0012),backgroundcolor = "#000000",colormap=:jet)
......@@ -1119,12 +1119,15 @@ function display3D(UX,UY,UZ,BOUND,ts=1)
cam=cam3d_cad!
ax = LScene(fig, scenekw = (camera = cam, show_axis = true))
sc=volume!(BOUND, algorithm = :iso, isorange = 1.0, isovalue = 1.0)
sc=volume!(BOUND, algorithm = :iso, isorange = 1.0, isovalue = 1.0,colorrange=(0, 2))
sc=volume!(res3d, algorithm = :absorption ,transparency=true,colorrange=(0, maximum(res3d)),backgroundcolor = "#FFFFFF",colormap=:jet)
update_cam!(ax.scene, Vec3f0(0, 1, 0), Vec3f0(0, 0, 0))
cmap = RGBAf0.(to_colormap(:jet, 100), 0.6)
sc.colormap[] = cmap
axis = ax.scene[OldAxis]
tstyle = axis[:names]
# tstyle[:textsize] = 12
......@@ -1133,6 +1136,27 @@ function display3D(UX,UY,UZ,BOUND,ts=1)
# axis[:ticks][:textsize] = 7
fig[1,1] = ax
save("./res3d/$(ts).png", fig, px_per_unit = 1)
##########################
fig = Figure(resolution =(800,800))
cam=cam3d_cad!
ax = LScene(fig, scenekw = (camera = cam, show_axis = true))
sc=volume!(BOUND, algorithm = :iso, isorange = 1.0, isovalue = 1.0,colorrange=(0, 2))
sc=volume!(res3d, algorithm = :absorption ,transparency=true,colorrange=(0, maximum(res3d)),backgroundcolor = "#FFFFFF",colormap=:jet)
# update_cam!(ax.scene, Vec3f0(0, 1, 0), Vec3f0(0, 0, 0))
cmap = RGBAf0.(to_colormap(:jet, 100), 0.6)
sc.colormap[] = cmap
axis = ax.scene[OldAxis]
tstyle = axis[:names]
# tstyle[:textsize] = 12
# tstyle[:gap] = 5
# axis[:ticks][:textcolor] = :black
# axis[:ticks][:textsize] = 7
fig[1,1] = ax
save("./res3d1/$(ts).png", fig, px_per_unit = 1)
# fig
display(fig)
......
This diff is collapsed.
......@@ -13643,6 +13643,60 @@
"Macro_xPhys1,Micro_xPhys1,Macro_masks1,Micro_Vol1,DHs1=CompliantMultiConTop3DU(θ,Macro_struct, Micro_struct,prob, penal,saveItr,maxloop,fabric,mgcg);\n"
]
},
{
"cell_type": "code",
"execution_count": 371,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"GLMakie.Screen(...)"
]
},
"execution_count": 371,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Micro_xPhys=Micro_xPhys1\n",
"AbstractPlotting.inline!(false)\n",
"\n",
"n=1\n",
"# for i=1:θ\n",
"i=3\n",
"temp=copy(Micro_xPhys[i])\n",
"# display(sum(Micro_xPhys[i]))\n",
"temp[Micro_xPhys[i].<0.7].=0.0\n",
"temp[Micro_xPhys[i].>=0.7].=i\n",
"scene = Scene(resolution = (400, 400))\n",
"scene= volume!(repeat(temp,n,n,n),colorrange=(0.0, θ), algorithm = :iso,isorange = 1/2, isovalue = i,colormap=cscheme)\n",
"display(scene)\n",
"# save(\"./img/Micro_xPhys3UArray_10_$(i).png\",scene)\n",
"# end\n"
]
},
{
"cell_type": "code",
"execution_count": 372,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"false"
]
},
"execution_count": 372,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"AbstractPlotting.inline!(true)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment