CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Siemens (https://www.cfd-online.com/Forums/siemens/)
-   -   HELP,ocean wave motion-inlet boundary? (https://www.cfd-online.com/Forums/siemens/54347-help-ocean-wave-motion-inlet-boundary.html)

 Blackhole January 27, 2005 23:10

HELP,ocean wave motion-inlet boundary?

Dear Sirs,

In star-cd ,do scalar(1) represent the F function in VOF method? I am a new learner and trying to model ocean wave motion. When I run the problem,it always occured "solution Divergince /unstable" after running one step.I am confused whether the code is wrong?

In my problem,d=water depth, TW=(wave period) dY=cell height in y direction. wh=wave height. The free surface function :

y1= wh*cos(kwa*X-fht*TIME)/2

And now I paste my coding here!Can you tell me what's the matter? Looking forward to receive from you! Here is the coding:(inlet coding)

PARAMETER(TW=2.5)

PARAMETER(d=1.5)

PARAMETER(wh=1)

PARAMETER(pie=3.141)

PARAMETER(g=9.18)

PARAMETER(dY=0.3)

IF(IREG.EQ.1) THEN

kwa=2*pie/L

fht=2*pie/TW

fhw=pie*wh/TW

fhtw=d+wh*cos(kwa*X-fht*TIME)/2

fhtz=max(fhtw-Y,zero)/dY

fthz=min(fhtz,one)

If(fhtz.gt.small)Then

SCALAR(1)=fthz

U=fhw*cosh(kwa*Y)*cos(kwa*X-fht*TIME)/sinh(kwa*d)

V=fhw*sinh(kwa*Y)*sin(kwa*X-fht*TIME)/sinh(kwa*d)

W=0

ELSE

SCALAR(1)=0

U=0

V=0

ENDIF

ENDIF C-------------------------------------------------------------------------

WRITE(6,*) "*** BCDEFI called for boundary "

RETURN

END

 All times are GMT -4. The time now is 18:24.