Dear Prof. Taylor, dear FEAP community,
I try to write a macro, that varies the parameters up to a termination criterion and performs a FE calculation . The main file should have the following form:
PARA
my_param = 10
POPT, Ifile, my_param
END
INTEractive
STOP
In the "Ifile" the young modulus is kept variable:
FEAP * * 4-element patch test
9,4,1,2,2,4
MATErial, 1
SOLId
PLANE STRAIN
ELAStic ISOTropic my_param 0.25
...
END
In "pcontr.f" I created a block, which reads the entries from "POPT":
...
elseif (pcomp (titl (1: 4), 'pop', 4)) then
Call acheck (titl, yyy, 20, 80, 160)
Read (yyy, 1000, err = 900, end = 911) titl (1: 4), dnam, dnam2, dnam3
Call popt (yyy, dnam, dnam2, dnam3)
...
The "POPT" subroutine as a minimum example looks as follows:
SUBROUTINE popt(value0, value1, value2, value3)
implicit none
Include 'iodata.h'
Include 'conval.h'
character (*) value0, value1, value2, value3
logical error, prt
real * 8 val, val2
save
Error = .false.
Prt = .true.
call getparam (value2, val, error, prt)
do while (val <100)
val = val + 10.0
val2 = val
call setparam (value2, val2, prt)
call pincld (value1)
end do
END
For me the problem is that the old output files are overwritten with new values. That is, concretely, that e.g. "Ofile_001" to "Ofile_010" same young modulus and always take the last ones.
I suspect that with each call from the include subroutine the old output file is overwritten with new values. How can you avoid this?
Thanks in advance.
Best regards
serkuz