plotDB1.m
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");
DB1muA=importdata(".\data\damB\t_Ux_A");
DBN1muA=importdata(".\data\damB\t_Fx_A");
DB1muB=importdata(".\data\damB\t_Ux_B");
DBN1muB=importdata(".\data\damB\t_Fx_B");
DB1muC=importdata(".\data\damB\t_Ux_C");
DBN1muC=importdata(".\data\damB\t_Fx_C");
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=DB1muA(:,1); y=DB1muA(:,2);
plt1=plot(x,y); hold on; plts(3,1)=plt1;
plt1.LineWidth = 1.5; plt1.Color = 'Black'; plt1.LineStyle = ':';
x=DB1muB(:,1); y=DB1muB(:,2);
plt1=plot(x,y); hold on; plts(4,1)=plt1;
plt1.LineWidth = 1.5; plt1.Color = 'Black'; plt1.LineStyle = '--';
x=DB1muC(:,1); y=DB1muC(:,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","present mesh A","present mesh B","present mesh C"];
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=DBN1muA(:,1); y=DBN1muA(:,3);
plt1=plot(x,y); hold on; plts(3,1)=plt1;
plt1.LineWidth = 1.5; plt1.Color = 'Black'; plt1.LineStyle = ':';
x=DBN1muB(:,1); y=DBN1muB(:,3);
plt1=plot(x,y); hold on; plts(4,1)=plt1;
plt1.LineWidth = 1.5; plt1.Color = 'Black'; plt1.LineStyle = '--';
x=DBN1muC(:,1); y=DBN1muC(:,3);
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","present mesh A","present mesh B","present mesh C"];
leg1.FontSize=17;
saveas(gcf,'t_Nx.png');saveas(gcf,'t_Nx.eps','epsc2'); close all;
3DdamBreak.mcr
#!MC 1410
$!PAGECONTROL CLEAR
$!ReadDataSet '"StandardSyntax" "1.0" "FEALoaderVersion" "436" "FILENAME_File" "C:\myPC\myFile\SJTU_G11\Sundry\research\postPro\case\system\controlDict" "AutoAssignStrandIDs" "Yes"'
DataSetReader = 'OpenFOAM (FEA)'
$!FrameName = 'alpha.water'
$!GlobalTime SolutionTime = 0.0
$!ThreeDView
PSIAngle = 60.0
ThetaAngle = 145.0
AlphaAngle = 0.0
ViewerPosition
{
X = -4.55
Y = 7.75
Z = 5.6
}
ViewWidth = 1.6
$!ActiveFieldMaps -= [2]
$!ActiveFieldMaps -= [3]
$!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 IsoSurfaceSelection = ThreeSpecificValues
$!IsoSurfaceAttributes 1 Isovalue1 = 0.5
$!IsoSurfaceAttributes 1 Isovalue2 = 0.75
$!IsoSurfaceAttributes 1 Isovalue3 = 0.25
$!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
$!FieldMap [4] Shade{Color = Yellow}
$!RedrawAll
$!CreateNewFrame
XYPos
{
X = 1.0
Y = 2.0
}
Width = 9.0
Height = 6.0
$!FrameLayout ShowBorder = No
$!FrameLayout IsTransparent = Yes
$!FrameName = 'Frame Front'
$!LOOP 11
$!VARSET |time| = (0.25*(|LOOP|-1))
$!FrameControl ActivateByNumber
Frame = 1
$!GlobalTime SolutionTime = |time|
$!VARSET |times| = (|time|*100)
$!VARSET |FNAME| = "damBreak3d|times|"
$!FrameControl ActivateByNumber
Frame = 2
$!ExportSetup ExportFormat = EPS
$!ExportSetup ImageWidth = 960
$!ExportSetup PrintRenderType = Image
$!ExportSetup ExportFName = 'C:\myPC\myFile\SJTU_G11\Sundry\research\postPro\|FNAME|.eps'
$!Export
ExportRegion = CurrentFrame
$!ExportSetup ExportFormat = JPEG
$!ExportSetup ExportRegion = CurrentFrame
$!ExportSetup ImageWidth = 1000
$!ExportSetup ExportFName = 'C:\myPC\myFile\SJTU_G11\Sundry\research\postPro\|FNAME|.jpeg'
$!Export
ExportRegion = CurrentFrame
$!ENDLOOP
# $!QUIT
3DdamBreakOver.mcr
#!MC 1410
$!PAGECONTROL CLEAR
$!ReadDataSet '"StandardSyntax" "1.0" "FEALoaderVersion" "436" "FILENAME_File" "C:\myPC\myFile\SJTU_G11\Sundry\research\postPro\case\system\controlDict" "AutoAssignStrandIDs" "Yes"'
DataSetReader = 'OpenFOAM (FEA)'
$!FrameName = 'alpha.water'
$!GlobalTime SolutionTime = 0.0
$!ThreeDView
PSIAngle = 60.0
ThetaAngle = 145.0
AlphaAngle = 0.0
ViewerPosition
{
X = -4.55
Y = 7.75
Z = 5.6
}
ViewWidth = 1.6
$!ActiveFieldMaps -= [2]
$!ActiveFieldMaps -= [3]
$!ActiveFieldMaps -= [5]
$!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 IsoSurfaceSelection = ThreeSpecificValues
$!IsoSurfaceAttributes 1 Isovalue1 = 0.5
$!IsoSurfaceAttributes 1 Isovalue2 = 0.75
$!IsoSurfaceAttributes 1 Isovalue3 = 0.25
$!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
$!FieldMap [4] Shade{Color = Yellow}
$!RedrawAll
$!CreateNewFrame
XYPos
{
X = 1.0
Y = 2.0
}
Width = 9.0
Height = 6.0
$!FrameLayout ShowBorder = No
$!FrameLayout IsTransparent = Yes
$!FrameName = 'Frame Front'
$!LOOP 11
$!VARSET |time| = (0.25*(|LOOP|-1))
$!FrameControl ActivateByNumber
Frame = 1
$!GlobalTime SolutionTime = |time|
$!VARSET |times| = (|time|*100)
$!VARSET |FNAME| = "damBreak3d|times|"
$!FrameControl ActivateByNumber
Frame = 2
$!ExportSetup ExportFormat = EPS
$!ExportSetup ImageWidth = 960
$!ExportSetup PrintRenderType = Image
$!ExportSetup ExportFName = 'C:\myPC\myFile\SJTU_G11\Sundry\research\postPro\|FNAME|.eps'
$!Export
ExportRegion = CurrentFrame
$!ExportSetup ExportFormat = JPEG
$!ExportSetup ExportRegion = CurrentFrame
$!ExportSetup ImageWidth = 1000
$!ExportSetup ExportFName = 'C:\myPC\myFile\SJTU_G11\Sundry\research\postPro\|FNAME|.jpeg'
$!Export
ExportRegion = CurrentFrame
$!ENDLOOP
# $!QUIT
showMesh.mcr
#!MC 1410
$!PAGECONTROL CLEAR
$!ReadDataSet '"StandardSyntax" "1.0" "FEALoaderVersion" "436" "FILENAME_File" "C:\myPC\myFile\SJTU_G11\Sundry\research\postPro\case\postProcessing\showMesh\system\controlDict" "AutoAssignStrandIDs" "Yes"'
DataSetReader = 'OpenFOAM (FEA)'
$!FrameName = 'mesh'
$!ThreeDView
PSIAngle = 50.0
AlphaAngle = 0.0
ThetaAngle = 175.0
ViewerPosition
{
X = 0.5
Y = 4.5
Z = 4.0
}
ViewWidth = 1.7
$!View Fit
ConsiderBlanking = Yes
$!ActiveFieldMaps -= [5]
$!ActiveFieldMaps -= [7]
$!GlobalContour 1 Legend{Show = No}
$!ThreeDAxis FrameAxis{Show = No}
$!FieldLayers ShowMesh = Yes
$!FieldMap [2] Shade{Show = No}
$!FieldMap [3] Shade{Show = No}
$!FieldMap [4] Shade{Show = No}
$!FieldMap [6] Shade{Show = No}
$!FieldMap [8] Shade{Show = No}
$!FieldMap [2] Mesh{Color = Custom2}
$!FieldMap [3] Mesh{Color = Custom2}
$!FieldMap [4] Mesh{Color = Custom2}
$!FieldMap [6] Mesh{Color = Custom2}
$!FieldMap [8] Mesh{Color = Custom6}
$!FieldLayers ShowEdge = Yes
$!FieldMap [1] EdgeLayer{EdgeType = BordersAndCreases}
$!FrameLayout ShowBorder = No
$!CreateNewFrame
XYPos
{
X = 1.0
Y = 1.5
}
Width = 9.0
Height = 5.6
$!FrameLayout ShowBorder = No
$!FrameLayout IsTransparent = Yes
$!FrameName = 'Frame Front'
$!ExportSetup ExportFormat = JPEG
$!ExportSetup ExportRegion = CurrentFrame
$!ExportSetup ImageWidth = 1000
$!ExportSetup ExportFName = 'C:\myPC\myFile\SJTU_G11\Sundry\research\postPro\showMesh.jpeg'
$!Export
ExportRegion = CurrentFrame
$!ExportSetup ExportFormat = EPS
$!ExportSetup ImageWidth = 960
$!ExportSetup PrintRenderType = Image
$!ExportSetup ExportFName = 'C:\myPC\myFile\SJTU_G11\Sundry\research\postPro\showMesh.eps'
$!Export
ExportRegion = CurrentFrame
# $!QUIT
showMeshOver.mcr
#!MC 1410
$!PAGECONTROL CLEAR
$!ReadDataSet '"StandardSyntax" "1.0" "FEALoaderVersion" "436" "FILENAME_File" "C:\myPC\myFile\SJTU_G11\Sundry\research\postPro\case\postProcessing\showMesh\system\controlDict" "AutoAssignStrandIDs" "Yes"'
DataSetReader = 'OpenFOAM (FEA)'
$!FrameName = 'mesh'
$!ThreeDView
PSIAngle = 50.0
AlphaAngle = 0.0
ThetaAngle = 175.0
ViewerPosition
{
X = 0.5
Y = 4.5
Z = 4.0
}
ViewWidth = 1.7
$!View Fit
ConsiderBlanking = Yes
$!ActiveFieldMaps -= [5]
$!ActiveFieldMaps -= [7]
$!GlobalContour 1 Legend{Show = No}
$!ThreeDAxis FrameAxis{Show = No}
$!FieldLayers ShowMesh = Yes
$!FieldMap [2] Shade{Show = No}
$!FieldMap [3] Shade{Show = No}
$!FieldMap [4] Shade{Show = No}
$!FieldMap [6] Shade{Show = No}
$!FieldMap [8] Shade{Show = No}
$!FieldMap [9] Shade{Show = No}
$!FieldMap [2] Mesh{Color = Custom2}
$!FieldMap [3] Mesh{Color = Custom2}
$!FieldMap [4] Mesh{Color = Custom2}
$!FieldMap [6] Mesh{Color = Custom2}
$!FieldMap [8] Mesh{Color = Custom6}
$!FieldMap [9] Mesh{Color = Red}
$!FieldLayers ShowEdge = Yes
$!FieldMap [1] EdgeLayer{EdgeType = BordersAndCreases}
$!FrameLayout ShowBorder = No
$!CreateNewFrame
XYPos
{
X = 1.0
Y = 1.5
}
Width = 9.0
Height = 5.6
$!FrameLayout ShowBorder = No
$!FrameLayout IsTransparent = Yes
$!FrameName = 'Frame Front'
$!ExportSetup ExportFormat = JPEG
$!ExportSetup ExportRegion = CurrentFrame
$!ExportSetup ImageWidth = 1000
$!ExportSetup ExportFName = 'C:\myPC\myFile\SJTU_G11\Sundry\research\postPro\showMesh.jpeg'
$!Export
ExportRegion = CurrentFrame
$!ExportSetup ExportFormat = EPS
$!ExportSetup ImageWidth = 960
$!ExportSetup PrintRenderType = Image
$!ExportSetup ExportFName = 'C:\myPC\myFile\SJTU_G11\Sundry\research\postPro\showMesh.eps'
$!Export
ExportRegion = CurrentFrame
# $!QUIT