G12-Sundry-research-代码

G12-Sundry-research-代码

matlab

clearvars; clc; % plotDB1.m
DB1ZX=importdata(".\data\damB\DB1ZX.csv");
DB1WU=importdata(".\data\damB\DB1WU.csv");
DBN1ZX=importdata(".\data\damB\DBN1ZX.csv");
DBN1WU=importdata(".\data\damB\DBN1WU.csv");
DB1mu=importdata(".\data\damB\t_Ux");
DBN1mu=importdata(".\data\damB\t_Fx");

fig1=figure(1);
set(gca,'xlim',[0,2.5],'ylim',[-0.5,4]); hold on;
x=DB1ZX(:,1); y=DB1ZX(:,2);
sc1=scatter(x,y); hold on;
sc1.SizeData=40; sc1.MarkerEdgeColor='Red'; sc1.Marker='x';
x=DB1WU(:,1); y=DB1WU(:,2);
sc1=scatter(x,y); hold on;
sc1.SizeData=40; sc1.MarkerEdgeColor='Blue'; sc1.Marker='^';
x=DB1mu(:,1); y=DB1mu(:,2);
plt1=plot(x,y); hold on; plt1.LineWidth = 1.5; plt1.Color = 'Black';
xL1=xlabel('Time (s)'); hold on; xL1.FontSize = 17;
yL1=ylabel('Ux (m/s)'); hold on; yL1.FontSize = 17;

fig2=figure(2);
set(gca,'xlim',[0,2.5],'ylim',[-15,45]); hold on;
x=DBN1ZX(:,1); y=DBN1ZX(:,2);
sc1=scatter(x,y); hold on;
sc1.SizeData=40; sc1.MarkerEdgeColor='Red'; sc1.Marker='x';
x=DBN1WU(:,1); y=DBN1WU(:,2);
sc1=scatter(x,y); hold on;
sc1.SizeData=40; sc1.MarkerEdgeColor='Blue'; sc1.Marker='^';
x=DBN1mu(:,1); y=DBN1mu(:,3);
plt1=plot(x,y); hold on; plt1.LineWidth = 1.5; plt1.Color = 'Black';
xL1=xlabel('Time (s)'); hold on; xL1.FontSize = 17;
yL1=ylabel('Fx (N)'); hold on; yL1.FontSize = 17;
clearvars; clc; % plotDB1.m
DB1ZX=importdata(".\data\damB\DB1ZX.csv");
DB1WU=importdata(".\data\damB\DB1WU.csv");
DBN1ZX=importdata(".\data\damB\DBN1ZX.csv");
DBN1WU=importdata(".\data\damB\DBN1WU.csv");
DB1mu_th=importdata(".\data\damB\t_Ux_th");
DBN1mu_th=importdata(".\data\damB\t_Fx_th");
DB1mu_ovin=importdata(".\data\damB\t_Ux_ovin");
DBN1mu_ovin=importdata(".\data\damB\t_Fx_ovin");
DB1mu_ovth=importdata(".\data\damB\t_Ux_ovth");
DBN1mu_ovth=importdata(".\data\damB\t_Fx_ovth");

plts=zeros(5,1);
fig1=figure(1);
set(gca,'xlim',[0,2.5],'ylim',[-1,5]); hold on;
x=DB1ZX(:,1); y=DB1ZX(:,2);
sc1=scatter(x,y); hold on; plts(1,1)=sc1;
sc1.SizeData=40; sc1.MarkerEdgeColor='Red'; sc1.Marker='x';
x=DB1WU(:,1); y=DB1WU(:,2);
sc1=scatter(x,y); hold on; plts(2,1)=sc1;
sc1.SizeData=40; sc1.MarkerEdgeColor='Blue'; sc1.Marker='^';
x=DB1mu_th(:,1); y=DB1mu_th(:,2);
plt1=plot(x,y); hold on; plts(3,1)=plt1;
plt1.LineWidth = 1.5; plt1.LineStyle = ':'; plt1.Color=[0,0,0,0.5];
x=DB1mu_ovin(:,1); y=DB1mu_ovin(:,2);
plt1=plot(x,y); hold on; plts(4,1)=plt1;
plt1.LineWidth = 1.5; plt1.LineStyle = '--';  plt1.Color=[0,0,0,0.75];
x=DB1mu_ovth(:,1); y=DB1mu_ovth(:,2);
plt1=plot(x,y); hold on; plts(5,1)=plt1;
plt1.LineWidth = 1.5; plt1.Color = 'Black'; plt1.LineStyle = '-';
xL1=xlabel('Time (s)'); hold on; xL1.FontSize = 17;
yL1=ylabel('Ux (m/s)'); hold on; yL1.FontSize = 17;
leg1=legend(plts); leg1.String=["Xie.Num","Wu.Exp","thincFoam","overInterFoam","overThincFoam"];
leg1.FontSize=17;
saveas(gcf,'t_Ux.png');saveas(gcf,'t_Ux.eps','epsc2'); % close all;

fig2=figure(2);
set(gca,'xlim',[0,2.5],'ylim',[-25,55]); hold on;
x=DBN1ZX(:,1); y=DBN1ZX(:,2);
sc1=scatter(x,y); hold on; plts(1,1)=sc1;
sc1.SizeData=40; sc1.MarkerEdgeColor='Red'; sc1.Marker='x';
x=DBN1WU(:,1); y=DBN1WU(:,2);
sc1=scatter(x,y); hold on; plts(2,1)=sc1;
sc1.SizeData=40; sc1.MarkerEdgeColor='Blue'; sc1.Marker='^';
x=DBN1mu_th(:,1); y=DBN1mu_th(:,3);
x_min=x(1,1); x_max=x(size(x,1),1); x_stp=(x_max-x_min)/2000;
x_int=x_min:x_stp:x_max; x_int = x_int';
int_method = 'spline'; %linear'spline'
y_int=interp1(x,y,x_int,int_method); y=y_int; x=x_int;
plt1=plot(x,y); hold on; plts(3,1)=plt1;
plt1.LineWidth = 1.5; plt1.LineStyle = ':'; plt1.Color=[0,0,0,0.5];
x=DBN1mu_ovin(:,1); y=DBN1mu_ovin(:,3);
x_min=x(1,1); x_max=x(size(x,1),1); x_stp=(x_max-x_min)/2000;
x_int=x_min:x_stp:x_max; x_int = x_int';
int_method = 'spline'; %linear'spline'
y_int=interp1(x,y,x_int,int_method); y=y_int; x=x_int;
plt1=plot(x,y); hold on; plts(4,1)=plt1;
plt1.LineWidth = 1.5; plt1.LineStyle = '--';  plt1.Color=[0,0,0,0.75];
x=DBN1mu_ovth(:,1); y=DBN1mu_ovth(:,3);
x_min=x(1,1); x_max=x(size(x,1),1); x_stp=(x_max-x_min)/2000;
x_int=x_min:x_stp:x_max; x_int = x_int';
int_method = 'spline'; %linear'spline'
y_int=interp1(x,y,x_int,int_method); y=y_int; x=x_int;
plt1=plot(x,y); hold on; plts(5,1)=plt1;
plt1.LineWidth = 1.5; plt1.Color = 'Black'; plt1.LineStyle = '-';
xL1=xlabel('Time (s)'); hold on; xL1.FontSize = 17;
yL1=ylabel('Fx (N)'); hold on; yL1.FontSize = 17;
leg1=legend(plts); leg1.String=["Xie.Num","Wu.Exp","thincFoam","overInterFoam","overThincFoam"];
leg1.FontSize=17;
saveas(gcf,'t_Nx.png');saveas(gcf,'t_Nx.eps','epsc2'); % close all;
clearvars; clc; % pltCWS.m
g=9.81;s0=2.0;s1=0.125;s=s0-s1;v=sqrt(2*g*s); disp(v);
WEI=importdata(".\data\cylWS\WEI.csv");
WAN=importdata(".\data\cylWS\WAN.csv");
tz=importdata(".\data\cylWS\t_zNum");
fig1=figure(1);
set(gca,'xlim',[0.015,0.12]); hold on;
x=WEI(:,1); y=WEI(:,2); x_m1=0.015; x=x+ones(size(x,1),1).*x_m1;
sc1=scatter(x,y); hold on;
sc1.SizeData=40; sc1.MarkerEdgeColor='Red'; sc1.Marker='x';
x=WAN(:,1); y=WAN(:,2); x_m1=0.015; x_m2=0.004; x_m1=x_m1+x_m2; x=x+ones(size(x,1),1).*x_m1;
sc1=scatter(x,y); hold on;
sc1.SizeData=40; sc1.MarkerEdgeColor='Blue'; sc1.Marker='^';
x=tz(:,1); y=tz(:,2);
plt1=plot(x,y); hold on; plt1.LineWidth = 1.5; plt1.Color = 'Black';

mcrs

#!MC 1410
$!PAGECONTROL CLEAR
$!ReadDataSet  '"StandardSyntax" "1.0" "FEALoaderVersion" "436" "FILENAME_File" "C:\myPC\myFile\SJTU_G12\Sundry\research\postPro\case\system\controlDict" "AutoAssignStrandIDs" "Yes"'
  DataSetReader = 'OpenFOAM (FEA)'
$!PlotType = Cartesian2D
$!TwoDAxis XDetail{RangeMin = 0.0}
$!TwoDAxis XDetail{RangeMax = 1.0}
$!TwoDAxis AxisMode = Independent
$!TwoDAxis YDetail{RangeMin = 0.0}
$!TwoDAxis YDetail{RangeMax = 1.0}
$!TwoDAxis YDetail{Ticks{ShowOnAxisLine = No}}
$!TwoDAxis YDetail{TickLabel{ShowOnAxisLine = No}}
$!TwoDAxis YDetail{Title{ShowOnAxisLine = No}}
$!TwoDAxis YDetail{AxisLine{Show = No}}
$!TwoDAxis XDetail{Ticks{ShowOnAxisLine = No}}
$!TwoDAxis XDetail{TickLabel{ShowOnAxisLine = No}}
$!TwoDAxis XDetail{Title{ShowOnAxisLine = No}}
$!TwoDAxis XDetail{AxisLine{Show = No}}
$!View MakeCurrentViewNice
$!FrameLayout ShowBorder = No
$!TwoDAxis GridArea{DrawBorder = No}
$!FieldLayers ShowMesh = No
$!FieldMap [4]  Shade{Show = No}
$!FieldMap [4]  Mesh{Color = Custom2}
$!FieldMap [4]  Mesh{MeshType = Wireframe}
$!FieldLayers ShowContour = Yes
$!FieldMap [4]  Contour{ContourType = Lines}
$!GlobalTime SolutionTime = 8.0
$!SetContourVar 
  Var = 'alpha0'
  ContourGroup = 1
$!ContourLevels New
  ContourGroup = 1
  RawData
1
0.5
$!FieldMap [4]  Contour{LinePattern = Solid}
$!FieldMap [4]  Contour{PatternLength = 0.5}
$!FieldMap [4]  Contour{LineThickness = 0.2}
$!GlobalContour 1  Legend{Show = No}
$!FrameName = 'Frame Background'
$!FieldLayers ShowMesh = Yes
$!FieldMap [1]  Mesh{Show = No}
$!FieldMap [2]  Mesh{Show = No}
$!FieldMap [3]  Mesh{Show = No}


$!CreateNewFrame 
  XYPos
    {
    X = 1.0
    Y = 0.25
    }
  Width = 9.0
  Height = 8.0
$!FrameLayout IsTransparent = Yes
$!FrameLayout ShowBorder = No
$!FrameName = 'Frame alpha1 at 4.0'
$!PlotType = Cartesian2D
$!TwoDAxis XDetail{RangeMin = 0.0}
$!TwoDAxis XDetail{RangeMax = 1.0}
$!TwoDAxis AxisMode = Independent
$!TwoDAxis YDetail{RangeMin = 0.0}
$!TwoDAxis YDetail{RangeMax = 1.0}
$!View MakeCurrentViewNice
$!TwoDAxis YDetail{Ticks{ShowOnAxisLine = No}}
$!TwoDAxis YDetail{TickLabel{ShowOnAxisLine = No}}
$!TwoDAxis YDetail{Title{ShowOnAxisLine = No}}
$!TwoDAxis YDetail{AxisLine{Show = No}}
$!TwoDAxis XDetail{Ticks{ShowOnAxisLine = No}}
$!TwoDAxis XDetail{TickLabel{ShowOnAxisLine = No}}
$!TwoDAxis XDetail{Title{ShowOnAxisLine = No}}
$!TwoDAxis XDetail{AxisLine{Show = No}}
$!FieldMap [4]  Shade{Show = No}
$!FieldLayers ShowContour = Yes
$!FieldMap [4]  Contour{ContourType = Lines}
$!FieldMap [4]  Contour{Color = Red}
$!FieldMap [4]  Contour{LineThickness = 0.4}
$!GlobalContour 1  Legend{Show = No}
$!GlobalTime SolutionTime = 4.0
$!SetContourVar 
  Var = 'alpha1'
  ContourGroup = 1
$!ContourLevels New
  ContourGroup = 1
  RawData
1
0.5


$!CreateNewFrame 
  XYPos
    {
    X = 1.0
    Y = 0.25
    }
  Width = 9.0
  Height = 8.0
$!FrameLayout IsTransparent = Yes
$!FrameLayout ShowBorder = No
$!FrameName = 'Frame alpha1 at 8.0'
$!PlotType = Cartesian2D
$!TwoDAxis XDetail{RangeMin = 0.0}
$!TwoDAxis XDetail{RangeMax = 1.0}
$!TwoDAxis AxisMode = Independent
$!TwoDAxis YDetail{RangeMin = 0.0}
$!TwoDAxis YDetail{RangeMax = 1.0}
$!View MakeCurrentViewNice
$!TwoDAxis YDetail{Ticks{ShowOnAxisLine = No}}
$!TwoDAxis YDetail{TickLabel{ShowOnAxisLine = No}}
$!TwoDAxis YDetail{Title{ShowOnAxisLine = No}}
$!TwoDAxis YDetail{AxisLine{Show = No}}
$!TwoDAxis XDetail{Ticks{ShowOnAxisLine = No}}
$!TwoDAxis XDetail{TickLabel{ShowOnAxisLine = No}}
$!TwoDAxis XDetail{Title{ShowOnAxisLine = No}}
$!TwoDAxis XDetail{AxisLine{Show = No}}
$!FieldMap [4]  Shade{Show = No}
$!FieldLayers ShowContour = Yes
$!FieldMap [4]  Contour{ContourType = Lines}
$!FieldMap [4]  Contour{Color = Blue}
$!FieldMap [4]  Contour{LineThickness = 0.4}
$!GlobalContour 1  Legend{Show = No}
$!GlobalTime SolutionTime = 8.0
$!SetContourVar 
  Var = 'alpha1'
  ContourGroup = 1
$!ContourLevels New
  ContourGroup = 1
  RawData
1
0.5
$!AttachText 
  AnchorPos
    {
    X = 65.0
    Y = 20.0
    }
  TextShape
    {
    IsBold = No
    Height = 28
    }
  Text = 'thinc-new'

$!CreateNewFrame 
  XYPos
    {
    X = 2.4
    Y = 1.55
    }
  Width = 6.3
  Height = 5.5
$!FrameLayout ShowBorder = No
$!FrameLayout IsTransparent = Yes
$!FrameName = 'Frame Front'
$!RedrawAll
$!ExportSetup ExportFormat = JPEG
$!ExportSetup ExportRegion = CurrentFrame
$!ExportSetup ImageWidth = 1000
$!ExportSetup ExportFName = 'C:\myPC\myFile\SJTU_G12\Sundry\research\postPro\shear2d.jpeg'
$!Export 
  ExportRegion = CurrentFrame
$!ExportSetup ExportFormat = EPS
$!ExportSetup ImageWidth = 960
$!ExportSetup PrintRenderType = Image
$!ExportSetup ExportFName = 'C:\myPC\myFile\SJTU_G12\Sundry\research\postPro\shear2d.eps'
$!Export 
  ExportRegion = CurrentFrame
# $!QUIT

以上为2DshearOver.mcr

3DcylinderWaterSlamming.mcr 

#!MC 1410
$!PAGECONTROL CLEAR
$!ReadDataSet  '"StandardSyntax" "1.0" "FEALoaderVersion" "436" "FILENAME_File" "C:\myPC\myFile\SJTU_G12\Sundry\research\postPro\case\system\controlDict" "AutoAssignStrandIDs" "Yes"'
  DataSetReader = 'OpenFOAM (FEA)'
$!FrameName = 'alpha.water'
$!GlobalTime SolutionTime = 0.088
$!ThreeDView 
  PSIAngle = 90.0
  ThetaAngle = -90.0
  AlphaAngle = 0.0
  ViewerPosition
    {
    X = 9.4
    Y = -0.2
    Z = 0.1
    }
  ViewWidth = 0.9
$!View FitSurfaces
  ConsiderBlanking = Yes
$!ActiveFieldMaps -= [2]
$!ActiveFieldMaps -= [3]
$!ActiveFieldMaps -= [4]
$!ActiveFieldMaps -= [5]
$!ActiveFieldMaps -= [6]
$!ActiveFieldMaps -= [7]
$!IsoSurfaceLayers Show = Yes
$!IsoSurfaceAttributes 1  DefinitionContourGroup = 1
$!SetContourVar 
  Var = 'alpha.water'
  ContourGroup = 1
$!ContourLevels Add
  ContourGroup = 1
  RawData
1
0.5
$!IsoSurfaceAttributes 1  Shade{Show = Yes}
$!IsoSurfaceAttributes 1  Contour{Show = No}
$!GlobalContour 1  Legend{Show = No}
$!IsoSurfaceAttributes 1  Shade{Color = Blue}
$!ThreeDAxis FrameAxis{Show = No}
$!IsoSurfaceAttributes 1  Effects{UseTranslucency = Yes}
$!IsoSurfaceAttributes 1  Effects{SurfaceTranslucency = 70}
$!FrameLayout ShowBorder = No
$!FieldLayers ShowEdge = Yes
$!FieldMap [1]  EdgeLayer{Show = Yes}
$!View FitSurfaces
  ConsiderBlanking = Yes

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

穿越前列线打造非凡yt

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值