diff --git a/src/ldem/ANSYS.m b/src/ldem/ANSYS.m index fa65e2f..e539e76 100644 --- a/src/ldem/ANSYS.m +++ b/src/ldem/ANSYS.m @@ -327,16 +327,14 @@ if TEST == 102 for I = 1:NNT - if BDX(I) == 1 - fprintf(IFILE, 'D,%d,UX\n', I); + + LOGIC1 = (W0(I) < (((L1/2)-0.49)*LCO)) && (W0(I) > (((L1/2)-0.51)*LCO)); + LOGIC2 = (V0(I) > (0.49 * LCO)) && (V0(I) < (0.51 * LCO)); + + if LOGIC1 && LOGIC2 + fprintf(IFILE, 'F,%d,FY,%d\n', I, -100); end - if BDY(I) == 1 - fprintf(IFILE, 'D,%d,UY\n', I); - end - if BDZ(I) == 1 - fprintf(IFILE, 'D,%d,UZ\n', I); - end - end + end end fprintf(IFILE, '\n'); diff --git a/src/ldem/BOUND.m b/src/ldem/BOUND.m index 6b9fdee..8e14eb4 100644 --- a/src/ldem/BOUND.m +++ b/src/ldem/BOUND.m @@ -26,70 +26,7 @@ %!-------------------------------------------------------------------------- %! - -% -% ! -% ! TEST = 101 -% IF (TEST.EQ.101) THEN -% -% DO I=1,NNT -% -% Logic2=(u0(I).LT.(0.51*LCO)).AND.(u0(I).GT.(0.49*LCO)) -% -% IF (Logic2) THEN -% BDX(I)=1 -% ! BDY(I)=1 -% ! BDZ(I)=1 -% ! write(*,*) "nobound=",I -% END IF -% -% Logic2=(u0(I).GT.(M1-0.51*LCO)).AND.(u0(I).LT.(M1-0.49*LCO)) -% -% IF (Logic2) THEN -% BDX(I)=1 -% ! BDY(I)=1 -% ! BDZ(I)=1 -% ! write(*,*) "nobound=",I -% END IF -% -% END DO -% END IF -% -% IF (TEST.EQ.102) THEN -% -% DO I=1,NNT -% Logic1=(v0(I).GT.(0.49*LCO)).AND.(v0(I).LT.(0.51*LCO)) -% Logic2=(u0(I).LT.(4.51*LCO)).AND.(u0(I).GT.(4.49*LCO)) -% IF (Logic1.AND.Logic2) THEN -% BDX(I)=1 -% BDY(I)=1 -% epsL! BDZ(I)=1 -% ! write(*,*) "nobound=",I -% END IF -% Logic1=(u0(I).GT.((M1-4.51)*LCO)).AND.(u0(I).LT.((M1-4.49)*LCO)) -% Logic2=(v0(I).LT.(0.51*LCO)).AND.(v0(I).GT.(0.49*LCO)) -% IF(Logic1.AND.Logic2) THEN -% BDy(I)=1 -% ! BDZ(I)=1 -% ! write(*,*) "nobound2=",I -% END IF -% END DO -% DO I=1,NNT -% LOGIC1=u0(I).LT.((M1-33.49)*LCO).AND.u0(I).GT.((M1-33.51)*LCO) -% LOGIC3=v0(I).LT.((N1-0.49)*LCO).AND.v0(I).GT.((N1-0.51)*LCO) -% LOGIC2=u0(I).LT.((33.51)*LCO).AND.u0(I).GT.((33.49)*LCO) -% IF(LOGIC1.AND.LOGIC3)THEN -% BDy(I)=1 -% endif -% IF(LOGIC2.AND.LOGIC3)THEN -% BDy(I)=1 -% endif -% -% END DO -% END IF -% RETURN -% END -% + if TEST == 101 % Masks for the two conditions (operate on all elements at once) @@ -104,16 +41,17 @@ if TEST == 102 % --- First block of conditions (replaces the first loop) --- - mask1 = (V0 > (0.49 * LCO)) & (V0 < (0.51 * LCO)) & ... - (U0 < (4.51 * LCO)) & (U0 > (4.49 * LCO)); - - mask2 = (U0 > ((M1 - 4.51) * LCO)) & (U0 < ((M1 - 4.49) * LCO)) & ... - (V0 < (0.51 * LCO)) & (V0 > (0.49 * LCO)); + mask1 = (W0 > (0.49 * LCO)) & (W0 < (0.51 * LCO)) ; + mask2=(W0 < ((L1-0.49)*LCO)) & (W0 > ((L1-0.51)*LCO)); + % Apply the assignments - BDX(mask1) = 1; - BDY(mask1) = 1; - BDY(mask2) = 1; % Originally BDy -> unified to BDY (Fortran is case-insensitive) + BDX(mask1) = 1; + BDY(mask1) = 1; + BDZ(mask1) = 1; + BDX( mask2) = 1; + BDY( mask2) = 1; + BDZ( mask2) = 1; % --- S econd block of conditions (replaces the second loop) --- diff --git a/src/ldem/CABAR.m b/src/ldem/CABAR.m index 69b0a3a..5290eeb 100644 --- a/src/ldem/CABAR.m +++ b/src/ldem/CABAR.m @@ -114,7 +114,7 @@ % PARAMETER (INN=1.2E6, INB=6E6, IRU=20, INCON=8) % These parameters are not used in this routine. %-------------------------------------------------------------------------- -NUMBAR = 7014; +NUMBAR = 14398; for B = 1:NBT NOI = CN(2*B - 1); diff --git a/src/ldem/CALOAD.m b/src/ldem/CALOAD.m index e713c28..6e4ba5a 100644 --- a/src/ldem/CALOAD.m +++ b/src/ldem/CALOAD.m @@ -125,22 +125,20 @@ if TEST == 102 VF2 = 400.0e-5; % m/s - for I = 1:NNT - LOGIC1 = (U0(I) < (M1 - 33.49) * LCO) && ... - (U0(I) > (M1 - 33.51) * LCO); - LOGIC3 = (V0(I) < (N1 - 0.49) * LCO) && ... - (V0(I) > (N1 - 0.51) * LCO); - LOGIC2 = (U0(I) < 33.51 * LCO) && ... - (U0(I) > 33.49 * LCO); + mask_z = (W0 < ( ((L1/2)-0.49)*LCO) ) & (W0 > ( ((L1/2)-0.51)*LCO) ); + mask_y = (V0 > (0.49 * LCO)) & (V0 < (0.51 * LCO)); + + + mascara_total = mask_z & mask_y; + + tempo_limite = 0.00035; - if LOGIC1 && LOGIC3 - V(2,I) = V0(I) - VF2 * TIME; - end - if LOGIC1 && LOGIC2 - V(2,I) = V0(I) - VF2 * TIME; - end + if TIME < tempo_limite + FRY(mascara_total) = 1000 * TIME; + else + + FRY(mascara_total) = 1000 * tempo_limite; end -end ini=1; - end +end diff --git a/src/ldem/DATA0.DAT b/src/ldem/DATA0.DAT index e9ce881..1864408 100644 --- a/src/ldem/DATA0.DAT +++ b/src/ldem/DATA0.DAT @@ -1,23 +1,23 @@ 102 ' TEST ' 123 ' SEED' -0.003 ' LCO ' -101 ' M ' -41 ' N ' -21 ' L ' -25000.00E+0 ' DF1 ' -25000.00E+0 ' DF2 ' +1E-3 ' LCO ' +6 ' M ' +6 ' N ' +51 ' L ' +2500.00E+0 ' DF1 ' +2500.00E+0 ' DF2 ' 0.015 ' TDAF ' 0.00E-00 ' CON ' -2.00E-7 ' DT ' -3.0E-2 ' TTOT ' +3.5E-7 ' DT ' +2.8E-3 ' TTOT ' 5 ' INCO ' -1 ' Ncon1 ' -2 ' Ncon2 ' -3 ' Ncon3 ' -4 ' Ncon4 ' -5 ' Ncon5 ' -9999999 ' OU2 ' -10000 ' OU3 ' +2441 ' Ncon1 ' +2441 ' Ncon2 ' +6870 ' Ncon3 ' +14398 ' Ncon4 ' +884 ' Ncon5 ' +14398 ' OU2 ' +1000 ' OU3 ' 0 ' OU4 ' 0 ' OU5 ' 1 ' OU6 ' @@ -25,8 +25,8 @@ 1 ' OU8 ' 1 ' OU9 ' 2.50E-01 ' PSN ' -2000.0E+0 ' ROH ' -32.00E+9 ' YNG ' -50.0E+00 ' GFR ' -0.028 ' DEQ ' +1500.0E+0 ' ROH ' +3.87E+9 ' YNG ' +0.5E+00 ' GFR ' +4.5E-3 ' DEQ '