Discussion in 'Stability' started by yuyewuyuconan, Nov 16, 2011.

1. Joined: Nov 2009
Posts: 45
Likes: 0, Points: 0, Legacy Rep: 10
Location: china

### yuyewuyuconanJunior Member

I calculate stablility by software "COMPASS"(CHINA CLASSIFFICATION SOCIETY's) usually.
I want to make a software by java which can create a excelfile contain all calculation's results(likes summary table).
Now,i have a program, the draft i cal is not the same as software .
I dont konw which formula is wrong.
Any one can help me ,thanks in advance!
following is partical code:

/*(double dis,double L,double draftAv,double Xg,double Xb,double Mtc,double Xf
* ,double zg,double zb,double bM,double wi) those are konwn
*/
public IntactStability(double dis,double L,double draftAv,double Xg,double Xb,double Mtc,double Xf
,double zg,double zb,double bM,double wi){

this.dis=dis;
this.L=L;
this.draftAv=draftAv;
this.Xg=Xg;
this.Xb=Xb;
this.trimArm=Xg-Xb;
this.trimMoment=dis*trimArm;
this.Mtc=Mtc;
this.trim=trimMoment/100/Mtc;
this.Xf=Xf;

// from
this.dfChange=(L/2-Xf)*trim/L;
this.daChange=-(L/2+Xf)*trim/L;
this.df=draftAv+dfChange;
this.da=draftAv+daChange;
this.dav=(df+da)/2;

//end
this.zg=zg;
this.zb=zb;
this.bM=bM;
this.zM=zb+bM;
this.GM0=zM-zg;
this.wi=wi;
this.GM1=wi/dis;
this.GM1=GM0-GM1;

}

2. Joined: Nov 2009
Posts: 45
Likes: 0, Points: 0, Legacy Rep: 10
Location: china

### yuyewuyuconanJunior Member

00! winter is coming.

Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.