실린더 잠수체 영향에 의한 이상유체 자유수면 유동의 결론.
조파저항과 조파저항 계수를 구해보자.
조파저항
f1 = Interal_s [Pi * N1,i] ds : similar to Sigma_i(1)_to_NB [Pi*N1,i*Si]
f1 = X 방향 Hydrodynamic force.
Pi = 물체의 i 번째 패널에 작용하는 압력
N1,i = 물체의 i 번째 패널의 법선벡터 x 방향 성분
NB = 총 패널 수
Si = 패널 면적. 여기서는 패널의 길이.
조파저항 계수
Cw = -f1 / (Rho/2 (V^2 * S))
S = 전체 침수 표면적
Rho = 해수 온도 15도씨에서의 해수밀도
지름 5m 의 무한 길이의 실린더가 자유수면 아래에 수평하게 잠겨 있는 2차원 문제에서,
유속 4-5 m/s 에서의 조파저항계수 변화는 아래 표와 같다.
[Cw 값 * E-03]
이 중 유속 4m/s 에 대한 압력분포는 아래 그림과 같다.
%%%
여기까지다.
원형 실린더가 아닌 익형을 도입한다거나, 혹은 복수개의 형상을 취급하는 등의 응용 작업을 얼른 추가하고 싶으나,
2차원 문제는 3차원 문제에 적용하기 이전에 그 방법론 자체를 한 번 적용해 본다는 차원에서 만족하고 여기서 쫑!!!
%%%
이른바 Main Oriented Programing 의 어정쩡한 프로세스.
#include<stdlib.h>
#include "TryMath.h"
#include "TryGeometry.h"
#include "ChildrenOfCTryGeometry.h"
void main()
{
int i,j,k ; //필요할 때 마다 쓰일 이터레이션 변수
CCommand comm ;
comm.readCommand("command") ; //다각형 파일 이름들을 저장하고 있는 파일
//Polyline
C2DPolyLineGroup pol ;
pol.set2DPolyLineGroup() ;
pol.drawPolygon("may_polyline_circle.plt",gPolyLineGroup.at(0).Positions) ;
pol.drawPolygon("may_polyline_image.plt",gPolyLineGroup.at(1).Positions) ;
pol.drawPolygon("may_polyline_freesurface.plt", gPolyLineGroup.at(2).Positions) ;
//여기서 gPolyLineGroup 정의.
//Local Base
C2DLocalBaseGroup lbase ;
lbase.set2DLocalBaseGroup() ;
//여기서 gPolyLocalBaseGroup 정의
//Collocation
C2DCollocationGroup cgroup ;
cgroup.set2DCollocationGroup() ;
cgroup.drawPolygon("may_collocation_circle.plt",gPolyCollocationGroup.at(0).Collocations) ;
cgroup.drawPolygon("may_collocation_image.plt",gPolyCollocationGroup.at(1).Collocations) ;
cgroup.drawPolygon("may_collocation_freesurface.plt",gPolyCollocationGroup.at(2).Collocations) ;
// 여기서 gPolyCollocationGroup 정의
//Source position
C2DSourcePositionGroup qgroup ;
qgroup.set2DSourcePositionGroup() ;
qgroup.drawPolygon("may_source_circle.plt",gPolySourcePositionGroup.at(0).SourcePositions) ;
qgroup.drawPolygon("may_source_image.plt",gPolySourcePositionGroup.at(1).SourcePositions) ;
qgroup.drawPolygon("may_source_freesurface.plt",gPolySourcePositionGroup.at(2).SourcePositions) ;
// 여기서 gPolySourcePositionGroup 정의
//Wave Elevation
C2DWaveElevation wave ;
wave.setStaggeredGrid() ; // generates the extra collocation and source point.
wave.setNumbers() ; // sets the new numbers of collocations on the hulls and free surfaces.
//SOLUTION
double VelX = 8. ;
wave.iterateWaveElevation(1, 0.000001, VelX) ;
//여기서 gSigmaGroup : vector<vector<double> >
//여기서 gWaveElevationGroup : vector<vector<aPosition> >
wave.drawPolygon("wave_elevation1.plt",gWaveElevationGroup.at(0)) ;
//Velocity Field
int nRow ;
int nCol ;
vector<aFieldVector> VelField ;
C2DFieldControl fcon ;
int NoGridDown = 60 ;
double zStep = -0.5 ;
fcon.createVelocityField(VelX, NoGridDown, zStep, nRow, nCol, VelField) ;
//여기서 nRow, nCol, VelField
wave.drawVectorField("vf_3.plt",nRow,nCol,VelField) ;
//Pressure Field
aFieldScalar aPress ;
vector<aFieldScalar> PressureField ;
PressureField.clear() ;
for(i=0 ; i<VelField.size() ; i++)
{
aPress.Pos.x = VelField.at(i).Pos.x ;
aPress.Pos.y = VelField.at(i).Pos.y ;
aPress.Pos.z = VelField.at(i).Pos.z ;
if(VelField.at(i).Vx==0.0)
aPress.Value = 0.0 ;
else
aPress.Value = 0.5*RHO_DENSITY_15_DEGREE*( pow(VelX,2.) - pow( (VelField.at(i).Vx+VelField.at(i).Vz), 2.)) ;
PressureField.push_back(aPress) ;
}
wave.drawScalarField("pre_3.plt",nRow,nCol,PressureField) ;
//여기서 압력장 PressureField
//Wave Resistance
double WaveResistance = 0.0 ;
double Coeff_Cw ;
double WettedArea ;
double TotalWettedArea = 0.0 ;
double NormalX ;
aPosition aBodyVel ;
double density = RHO_DENSITY_15_DEGREE ;
aFieldScalar aPressure ;
vector<aFieldScalar> aPressureGroup ;
aPressureGroup.clear() ;
vector<vector<aFieldScalar> > PolyPressureGroup ;
PolyPressureGroup.clear() ;
int NoUnderBody = 0 ; //all numbers of the bodies in the water.
for(i=0 ; i<gConditionNumberGroup.size() ; i++)
{
if(gConditionNumberGroup.at(i)==0)
NoUnderBody++ ;
}
for(i=0 ; i<NoUnderBody ; i++)
{
for(j=0 ; j<gPolyCollocationGroup.at(i*2).Collocations.size() ; j++) //iterates by Body Collocation Group
{
//Position
aPressure.Pos.x = gPolyCollocationGroup.at(i).Collocations.at(j).x ;
aPressure.Pos.y = gPolyCollocationGroup.at(i).Collocations.at(j).y ;
aPressure.Pos.z = gPolyCollocationGroup.at(i).Collocations.at(j).z ;
//Veloctity
wave.getVelocity(VelX,aPressure.Pos,aBodyVel) ;
//Pressure
aPressure.Value = 0.5*density*(pow(VelX,2.)-pow((aBodyVel.x+aBodyVel.z),2.)) ;
//Wetted Area
WettedArea = gPolyLocalBaseGroup.at(i*2).LocalBases.at(j).length ;
//Total Wetted Area
TotalWettedArea += WettedArea ;
//Normal x direction
NormalX = gPolyLocalBaseGroup.at(i*2).LocalBases.at(j).n.x ;
//Total Actual hydrodynamic force
WaveResistance += aPressure.Value*NormalX*WettedArea ;
//Contain
aPressureGroup.push_back(aPressure) ;
}
//Contain
PolyPressureGroup.push_back(aPressureGroup) ;
}
//wave resistance
cout<<"Wave Resistance "<<WaveResistance<<endl;
//wave resistance coefficient
Coeff_Cw = -WaveResistance/(0.5*density*pow(VelX,2.)*TotalWettedArea) ;
cout<<Coeff_Cw<<endl;
// 여기서 조파저항과 조파저항계수.
}//MAIN
위에서 표시된 광역변수를 포함하여 이 프로그램이 사용하는 광역변수는 다음과 같다.
gConditionNumberGroup 경계조건 식별
gFileNameGroup 파일 이름 저장
gPolyCollocationGroup 소스포인트에 대한 조종점(Collocation)
gPolyLineGroup 다각형 자료구조 (실린더, 실린더 이미지, 자유수면)
gPolyLocalBaseGroup 각 다각형의 국부좌표 방향벡터
gPolySourcePositionGroup 소스포지션 (Desingularized Source Position)
gSigmaGroup 소스강도
gWaveElevationGroup 파고.