Rishi Raj
Aerospace
- May 19, 2023
- 1
I am trying to delete elements based on temperature criteria. I am able to do so for homogeneous material. Next, I am attempting to delete fibers and matrix both but for different threshold temperature. I am using VUSDFLD subroutine, but it is not deleting matrix or fibers.
THIS IS THE CODE:
subroutine vusdfld(
c Read only -
* nblock, nstatev, nfieldv, nprops, ndir, nshr,
* jElem, kIntPt, kLayer, kSecPt,
* stepTime, totalTime, dt, cmname,
* coordMp, direct, T, charLength, props,
* stateOld,
c Write only -
* stateNew, field )
c
include 'vaba_param.inc'
c
dimension jElem(nblock), coordMp(nblock,*),
* direct(nblock,3,3), T(nblock,3,3),
* charLength(nblock), props(nprops),
* stateOld(nblock,nstatev),
* stateNew(nblock,nstatev),
* field(nblock,nfieldv)
character*80 cmname
c
c Local arrays from vgetvrm are dimensioned to
c maximum block size (maxblk)
parameter( nrData=6 )
character*3 cData(maxblk*nrData)
dimension rData(maxblk*nrData), jData(maxblk*nrData)
jStatus = 1
call vgetvrm('TEMP', rData, jData, cData, jStatus)
c DOUBLE PRECISION MaxTemperaturematrix , MaxTemperaturefiber
! Set the maximum temperature threshold for element deletion
MaxTemperaturematrix = 200
MaxTemperaturefiber = 1700
IF (CMNAME == 'matrix') then
DO k = 1, nblock
stateNew(k,1) = rData(k)
! Check if the temperature of the element exceeds the threshold
IF (stateNew(k,1) > MaxTemperaturematrix) THEN
! Element temperature exceeds threshold, mark for deletion
stateNew(k,1) = 0
END IF
END DO
ELSE IF (CMNAME == 'fiber') then
DO k = 1, nblock
stateNew(k,2) = rData(k)
! Check if the temperature of the element exceeds the threshold
IF (stateNew(k,2) > MaxTemperaturefiber) THEN
! Element temperature exceeds threshold, mark for deletion
stateNew(k,2) = 0
END IF
END DO
END IF
RETURN
END
THIS IS THE CODE:
subroutine vusdfld(
c Read only -
* nblock, nstatev, nfieldv, nprops, ndir, nshr,
* jElem, kIntPt, kLayer, kSecPt,
* stepTime, totalTime, dt, cmname,
* coordMp, direct, T, charLength, props,
* stateOld,
c Write only -
* stateNew, field )
c
include 'vaba_param.inc'
c
dimension jElem(nblock), coordMp(nblock,*),
* direct(nblock,3,3), T(nblock,3,3),
* charLength(nblock), props(nprops),
* stateOld(nblock,nstatev),
* stateNew(nblock,nstatev),
* field(nblock,nfieldv)
character*80 cmname
c
c Local arrays from vgetvrm are dimensioned to
c maximum block size (maxblk)
parameter( nrData=6 )
character*3 cData(maxblk*nrData)
dimension rData(maxblk*nrData), jData(maxblk*nrData)
jStatus = 1
call vgetvrm('TEMP', rData, jData, cData, jStatus)
c DOUBLE PRECISION MaxTemperaturematrix , MaxTemperaturefiber
! Set the maximum temperature threshold for element deletion
MaxTemperaturematrix = 200
MaxTemperaturefiber = 1700
IF (CMNAME == 'matrix') then
DO k = 1, nblock
stateNew(k,1) = rData(k)
! Check if the temperature of the element exceeds the threshold
IF (stateNew(k,1) > MaxTemperaturematrix) THEN
! Element temperature exceeds threshold, mark for deletion
stateNew(k,1) = 0
END IF
END DO
ELSE IF (CMNAME == 'fiber') then
DO k = 1, nblock
stateNew(k,2) = rData(k)
! Check if the temperature of the element exceeds the threshold
IF (stateNew(k,2) > MaxTemperaturefiber) THEN
! Element temperature exceeds threshold, mark for deletion
stateNew(k,2) = 0
END IF
END DO
END IF
RETURN
END