SCons for Ansys APDL Analysis

"Hubley, Christopher (GE Aerospace, US)" <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <[email protected]>
> So it looks like you can scan the input file to find the dependencies.
I'm sure that you could, but I think it'd take a bit of noodling be tough to
make it bulletproof.
There aren't namespaces in APDL. If I read in another file with the /INPUT
command, it just executes The code in that file. So, a scanner might have to
descend into dependencies to look for more dependencies.


> Though it writes to it's input file?
There is typically a binary database file which is a dependency of a
APDL script. The database contains FEM nodes, elements, boundary conditions,
model settings, etc.
When running a mission analysis, we will update this database for each time
step. When the model is solved, Ansys creates a second results database, and
Some other files (restart files, etc.). A mission might include hundreds of
timesteps.


> Can you get it to write to a different named file?
Yes, you can copy/rename the input file to a new filename within the script.
I think that this kind of coding discipline would be required for SCons.

Perhaps a SCons-compatible APDL script might look something like this:

    ! MyFile.inp
    /COPY, path/to/PREV_DATABASE,   db,, DATABASE_NAME,   db   ! <- An input
    /COPY, path/to/PREV_DATABASE, emat,, DATABASE_NAME, emat   ! <- An input
    /COPY, path/to/PREV_DATABASE, esav,, DATABASE_NAME, esav   ! <- An input
    /FILENAM, DATABASE_NAME
    RESUME

    /SOLU
        ANTYPE, STATIC, RESTART
        /INPUT, cut_boundary_loads, inp   ! <- An input
        /INPUT, nodal_temperatures, inp   ! <- An input
        /INPUT, pressure_loads, inp   ! <- An input
        SOLVE   ! <- Creates a results database (DATABASE_NAME.rst, .emat, .esav)
                !    and other files
    FINISH
    SAVE ! Updates DATABASE_NAME.db


One issue that I have is that I'd like to understand what SCons is doing when I
set "duplicate=False".

I've only gotten Ansys to run with "duplicate=True", but then that leaves me
with a bunch of extra files in my build directory. It'd be great if I could 
clean that up afterwards without SCons requiring a rebuild.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.