Re: SCons for Ansys APDL Analysis

Bill Deegan <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <CAEyG4CHUvZ+h8Fzk48Q_xQvNHGbPcT2TsWkKuTCRC4tSGrBpjQ@mail.gmail.com>
so it looks like you can scan the input file to find the dependencies.
Though it writes to it's input file?
Can you get it to write to a different named file?

On Mon, Oct 17, 2022 at 8:22 PM Hubley, Christopher (GE Aerospace, US) <
[email protected]> wrote:

> Hi Bill,
> Thanks for clarifying.
>
> > How do you specify this dependency to the ansys tools? is this a command
> in
> > the APDL file? Is this a command line to a tool?  Other?
>
> APDL doesn’t have anything like #include statements like C++ or import
> statements like Python.
>
> The main script is called from the command line.
> Dependencies are simply called from files with commands in the script.
>
> For example,
>
>     RESUME, path/to/my/database, db
>     /INPUT, path/to/my/apdl_script, inp
>
> You could also call “myCmd.mac” (in the working directory) by adding a
> line to your script:
>     myCmd
>
> I think there are a few more ways to specify reading from files (e.g.
> *USE, CDREAD), but the three above are the most common.
>
> A simple APDL file might look like this:
>
>     ! MyFile.inp
>     ! (This is a comment)
>     RESUME, DATABASE_NAME, db   ! <- An input
>     ! Or
>     /FILENAM, DATABASE_NAME
>     RESUME
>
>     /PREP7
>         /INPUT, cut_boundary_loads, inp   ! <- An input
>         /INPUT, nodal_temperatures, inp   ! <- An input
>         /INPUT, pressure_loads, inp   ! <- An input
>     FINISH
>     /SOLU
>         SOLVE   ! <- Creates a results database (DATABASE_NAME.rst) and
>                 !    other files
>     FINISH
>     SAVE ! Updates DATABASE_NAME.db
>
> You would launch Ansys in batch mode with a command like this:
>     $ ansys212x64 -b -i myFile.inp -o myFile.out
>
> Or like this:
>     $ ansys212x64 -b < myFile.inp > myFile.out
>
>
> I anticipate that some coding discipline may be required to make APDL
> scripts
> work with SCons.
> For example, making sure that input DB files renamed prior to modifying
> them.
>
>
> > I noticed you said you're running in cygwin?
> > Is this with cygwin's python? or windows python, but running in a cygwin
> bash shell?
>
> Our setup is a bit peculiar. We run our engineering tools with Cygwin (e.g.
> Ansys), but our Python installation Anaconda Python installed in Windows.
>
> I had to hack in a Python subprocess call to get SCons to launch Ansys.
>
> -Chris
>
> Christopher K. Hubley
> Senior Engineer, TFTJ Fan & Compressor
> GE Aviation
> _______________________________________________
> Scons-users mailing list
> [email protected]
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>

_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
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.