CCM Test: Propagation of a salinity through a flow of clean water. ************************************************************** DISPLAY This test case concerns simulation of the salinity propagation through incoming flow of fresh water (see picture below). That kind of flow may arise in the sea bays pollution simulations. <= Mixture <= Fresh => Salted water water User can investigate the influence of the salted water velocity (VSIN) and fresh water pressure (PFRSH) values on the developing flow pattern and the distance of salt propagation. User can switch from the default colocated computational algorithm (CCM) to the staggered one (STAG) by setting LCCM= F. ---------------------------------------------------------- ENDDIS L(PAUSE ************************************************************** BOOLEAN(LCCM); LCCM = T ************************************************************** PHOTON USE p ; ; ; ; ; vi x msg Computational Domain: rot 90 gr i 4 msg Press Any Key to Continue... pause cl set vec av off msg Velocity Vectors: vec i 4 sh msg Press Any Key to Continue... pause cl msg Contours of Pressure: con p1 i 4 fi;0.001 pause cl msg Contours of Salinity: con SALT i 4 fi;0.001 msg Press Eto exit PHOTON ... ENDUSE ************************************************************** GROUP 1. Run title and other preliminaries IF(LCCM) THEN + TEXT(CCM : Salted water flow. ELSE + TEXT(STAG: Salted water flow. ENDIF TITLE INTEGER(NY1,NY2) REAL(LENG1,DIAM,SALTIN,SALT0,REFDEN,ALFA,DTHYD,WIDTH,LENGTH,DEPTH) REAL(VSIN,PFRSH) ** Problem definition: SALT0= 10.; SALTIN= 50; REFDEN= 1000.; ALFA = 8.E-4 VSIN = 0.3; PFRSH = 200. DIAM = 0.1; LENG1 = 5.*DIAM; LENGTH= 7.*DIAM; DEPTH= 1.75*DIAM NY1 = 6; NY2 = 8; NY = NY1+NY2 NZ = 10; WIDTH = 2.*DIAM; NX = 6 GROUP 2. Transience; time-step specification STEADY= F; GRDPWR(T,30,9.0,1.0) GROUP 6. Body-fitted coordinates or grid distortion BFC= T; GSET(D,NX,NY,NZ,WIDTH,LENGTH,DIAM) GSET(P,P1,0.0, 0.0, 0.0); GSET(P,P2,0.0,LENG1, 0.0) GSET(P,P3,0.0,LENG1,DIAM); GSET(P,P4,0.0, 0.0,DIAM) GSET(L,L12,P1,P2,NY1,1.0); GSET(L,L23,P2,P3,NZ,S1.5) GSET(L,L34,P3,P4,NY1,1.0); GSET(L,L41,P4,P1,NZ,S1.5) GSET(F,F1,P1,-,P2,-,P3,-,P4,-); GSET(M,F1,+J+K,1,1,1) GSET(C,I:NX+1:,F,I1,1,NY,1,NZ,+,WIDTH,0.0,0.0,INC,1.0) GSET(P,P5, 0.0,LENGTH, 0.0); GSET(P,P6, WIDTH,LENGTH, 0.0) GSET(P,P7,WIDTH,LENGTH,DIAM); GSET(P,P8,WIDTH/2.,LENGTH,DEPTH) GSET(P,P9, 0.0,LENGTH,DIAM) GSET(L,L56,P5,P6, NX, 1.0); GSET(L,L67,P6,P7, NZ,S1.5) GSET(L,L78,P7,P8,NX/2, 1.0); GSET(L,L89,P8,P9,NX/2, 1.0) GSET(L,L95,P9,P5, NZ,S1.5) GSET(F,F2,P5,-,P6,-,P7,P8,P9,-); GSET(M,F2,+I+K,1,NY+1,1) GSET(T,J:NY1+1:,F,J:NY+1:,1.5) GROUP 7. Variables stored, solved & named NAME(H1)= SALT; SOLVE(P1,U1,V1,W1,SALT) SOLUTN(P1,Y,Y,Y,N,N,N); SOLUTN(SALT,Y,Y,Y,P,P,P) IF(LCCM) THEN L($F150) ENDIF GROUP 8. Terms (in differential equations) & devices TERMS(SALT,N,Y,Y,P,P,P) GROUP 9. Properties of the medium (or media) ENUL= 1.E-5; RHO1= LINSCAL; RHO1A= REFDEN; RHO1B= ALFA*REFDEN PRNDTL(SALT)= 1000. GROUP 11. Initialization of variable or porosity fields INIADD= F; FIINIT(SALT)= SALT0 GROUP 13. Boundary conditions and special sources ** North Boundary: PATCH( NORR,NORTH,1,NX,NY,NY, 1,NZ/2,1,LSTEP) COVAL(NORR, P1,10.*FIXP,0.0); COVAL(NORR,SALT,ONLYMS,SAME) PATCH(NORRL,NORTH,1,NX,NY,NY,NZ/2+1, NZ,1,LSTEP) COVAL(NORRL,P1,1.E-20,1.E20*REFDEN*VSIN) COVAL(NORRL,SALT,ONLYMS,SALTIN) ** South Boundary: PATCH(SYD,SOUTH,1,NX,1,1,1,NZ,1,LSTEP) COVAL(SYD,P1,1000.,PFRSH); COVAL(SYD,SALT,ONLYMS,SALT0) ** Bottom Friction: PATCH(BOTFRI,HWALL,1,NX,1,NY,NZ,NZ,1,LSTEP) IF(LCCM) THEN + COVAL( NORR,UC1,ONLYMS,SAME); COVAL( NORR,VC1,ONLYMS,SAME) + COVAL( NORR,WC1,ONLYMS,SAME) + COVAL( NORRL,UC1,ONLYMS,SAME); COVAL( NORRL,VC1,ONLYMS,SAME) + COVAL( NORRL,WC1,ONLYMS,SAME) + COVAL( SYD,UC1,ONLYMS,SAME); COVAL( SYD,VC1,ONLYMS,SAME) + COVAL( SYD,WC1,ONLYMS,SAME) + COVAL(BOTFRI,UC1, 1.0,0.0); COVAL(BOTFRI,VC1, 1.0,0.0) + COVAL(BOTFRI,WC1, 1.0,0.0) ELSE + COVAL( NORR,U1,ONLYMS,SAME); COVAL( NORR,V1,ONLYMS,SAME) + COVAL( NORR,W1,ONLYMS,SAME) + COVAL( NORRL,U1,ONLYMS,SAME); COVAL( NORRL,V1,ONLYMS,SAME) + COVAL( NORRL,W1,ONLYMS,SAME) + COVAL( SYD,U1,ONLYMS,SAME); COVAL( SYD,V1,ONLYMS,SAME) + COVAL( SYD,W1,ONLYMS,SAME) + COVAL(BOTFRI,U1, 1.0,0.0); COVAL(BOTFRI,V1, 1.0, 0.0) ENDIF ** Buoyancy forces: BUOYC= 9.81 IF(LCCM) THEN + BUOYE= REFDEN*(1.+ALFA*SALT0) ELSE + BUOYD= REFDEN*(1.+ALFA*SALT0) + PATCH(BUOY,PHASEM,1,NX,1,NY,1,NZ,1,LSTEP) + COVAL(BUOY,W1,FIXFLU,DENSDIFF) ENDIF GROUP 15. Termination of sweeps LSWEEP= 40; TSTSWP= -1 GROUP 16. Termination of iterations SELREF= T; RESFAC= 1.E-6 GROUP 17. Under-relaxation devices RELAX(P1,LINRLX,0.5); DTHYD= (LENGTH-LENG1)/NY2 RELAX(UC1,FALSDT,DTHYD); RELAX( VC1,FALSDT,DTHYD) RELAX(WC1,FALSDT,DTHYD); RELAX(SALT,FALSDT,DTHYD) SPEDAT(SET,GXMONI,TRANSIENT,L,F) GROUP 19. Data communicated by satellite to GROUND IF(LCCM) THEN * LSG4= T activates nonorthogonality treatment in CCM * LSG7= T permits CCM-solver to use higher order schemes. + LSG4= T; LSG7= F + LITER(UC1)= 5; LITER(VC1)= 5; LITER(WC1)= 5 SCHMBEGIN VARNAM VC1 SCHEME MINMOD VARNAM WC1 SCHEME MINMOD VARNAM SALT SCHEME MINMOD SCHMEND ENDIF GROUP 22. Spot-value print-out IXMON = NX/2+1; IYMON=NY/2+1; IZMON=NZ/2+1