TALK=T;RUN(1,1)
integer(EXAMPLE,lastex) EXAMPLE=1; lastex=0 label start mesg(EXAMPLE=1; basic case; uniform grid; no cutting mesg(EXAMPLE=2: as for 1; dot-patch with smaller y and z mesg(EXAMPLE=3: as for 1; index patch with smaller y and z mesg(EXAMPLE=4: as for 2; dot-patch with smaller non-uniform grid mesg(EXAMPLE=5: as for 3; index-patch with smaller non-uniform grid mesgm(EXAMPLE=:EXAMPLE: If not OK insert other; else RETURN lastex=EXAMPLE readvdu(EXAMPLE,int,EXAMPLE) if(EXAMPLE.ne.lastex) then goto start endif TALK=F;RUN( 1, 1) Group 1. Run Title TEXT(sphere with centre at origin DISPLAY This 5-example case shows how a dot-patch retains the in-form object shape better than the indicial patch when the grid distribution changes ENDDIS LIBREF=386 ************************************************************ Group 2. Transience STEADY=T ************************************************************ Groups 3, 4, 5 Grid Information NX=50;NY=50;NZ=50 XULAST=1.0; YVLAST=1.0; ZWLAST=1.0 #UNIGRID if(EXAMPLE.gt.3) then ! non-uniform grid mesg(grid is non-uniform GRDPWR(X,NX,XULAST,0.5) GRDPWR(Y,NY,YVLAST,0.5) GRDPWR(Z,NZ,ZWLAST,0.5) endif Group 7. Variables: STOREd,SOLVEd,NAMEd STORE(MARK) ! MARK is set to non-zero values inside In-Form objects ************************************************************ Group 9 Properties ************************************************************ Group 11.Initialise Var/Porosity Fields FIINIT(MARK) = 0.0 ! inform11begin with dot-patch if(EXAMPLE.eq.3) then goto index endif if(EXAMPLE.eq.5) then goto index endif EXAMPLE mesg(using dot_patch PATCH(.PATCH1,INIVAL,0,1000,0,1000,0,1000,1,1000) ! no cut if(EXAMPLE.gt.1) then PATCH(.PATCH1,INIVAL,0,1000,0,800,0,600,1,1000) ! cut y and z sizes endif (INFOB at .PATCH1 is SPHERE(.0,.0,.0,XULAST) with INFOB_SP1) (STORED of MARK at .PATCH1 IS 1.0 with INFOB_SP1) goto end label index with index-patch EXAMPLE mesg( using index patch PATCH(PATCH1,CELL,1,NX,1,8*NY/10,1,6*NZ/10,1,1) (INFOB at PATCH1 is SPHERE(.0,.0,.0,XULAST) with INFOB_SP1) (STORED of MARK at PATCH1 is 1.0 with INFOB_SP1) label end inform11end stop