[Scons-users] SCons for Ansys APDL Analysis

Hubley, Christopher (GE Aerospace, US) Christopher.Hubley at ge.com
Sat Nov 4 12:59:33 EDT 2023


Erm… correction please…
My goal would be to generate the files in the results and results_mcase directory using scons to launch Python and Ansys.

    project_root/
        SConstruct
        site_scons/
            site_init.py
        source/
            SConscript
            base_model.db
            write_input_files.py    # Requires runfile_template.apdl, boundary_conditions/case_???.apdl
            runfile_template.apdl
            boundary_conditions/
                case_001.apdl
                case_002.apdl
                ...
            mission_database.set    # Requires base_model.db, mission_case_???.rst
        results/
            mission_case_001.inp    # From write_input_files.py
            mission_case_001.db     # From mission_case_001.inp, Requires: base_model.db
            mission_case_001.rst    # From mission_case_001.inp, Requires: base_model.db
            mission_case_001.out    # From mission_case_001.inp, Requires: base_model.db
            mission_case_001.err    # From mission_case_001.inp, Requires: base_model.db
            mission_case_001.emat   # From mission_case_001.inp, Requires: base_model.db
            mission_case_001.esav   # From mission_case_001.inp, Requires: base_model.db
            mission_case_002.inp    # From write_input_files.py
            mission_case_002.db     # From mission_case_002.inp, Requires: mission_case_001.{db,emat,esav}
            mission_case_002.rst    # From mission_case_002.inp, Requires: mission_case_001.{db,emat,esav}
            mission_case_002.out    # From mission_case_002.inp, Requires: mission_case_001.{db,emat,esav}
            mission_case_002.err    # From mission_case_002.inp, Requires: mission_case_001.{db,emat,esav}
            mission_case_002.emat   # From mission_case_002.inp, Requires: mission_case_001.{db,emat,esav}
            mission_case_002.esav   # From mission_case_002.inp, Requires: mission_case_001.{db,emat,esav}
            ...
        results_mcase/
           mission_database.37     # From mission_database.set
            mission_database.38     # From mission_database.set


From: Scons-users <scons-users-bounces at scons.org> On Behalf Of Hubley, Christopher (GE Aerospace, US)
Sent: Saturday, November 4, 2023 9:01 AM
To: Brindley, Kyle Andrew <kbrindley at lanl.gov>; scons-users at scons.org
Subject: EXT: Re: [Scons-users] SCons for Ansys APDL Analysis

WARNING: This email originated from outside of GE. Please validate the sender's email address before clicking on links or attachments as they may not be safe.

Kyle,
I just wanted to take a second to respond to your message and thank you for recommending WAVES. I think that your response slipped by me…

I tried and gave up on scons a year ago because I couldn’t get it to launch the ANSYS interpreter in my variant directory with my custom builder.

Here we are a year later… and I re-approached scons for a bolted joint analysis that I am working on in Python. I guess Chris does analysis in the third quarter.

The waves project looks cool!
It looks like you’ve written a scanner which parses Abaqus scripts and grabs dependencies? Very neat.

I inspected your code a bit and it looks as if you solved the problem that I had by changing directories prior to executing your build action, and feeding the interpreter absolute paths to the input files.

    #python/scons
    action = [f"{_cd_action_prefix} {program}..."]

Maybe that doesn’t seem like the normal way to run scons, but hey… if it works, it works. It solves the problem that I was having.
It also makes me feel a bit better… I felt like I was going insane when I couldn’t get scons to build where it was supposed to.

Here’s a minimal example of what I was trying to achieve…

Before building…
    project_root/
        SConstruct
        site_scons/
            site_init.py
        source/
            SConscript
            model.db
            runfile.apdl
            boundary_conditions/
                case_001.inp
                case_002.inp
                ...

After building…
    project_root/
        SConstruct
        site_scons/
            site_init.py
        source/
            SConscript
            model.db
            generate_runfiles.py
            runfile_template.apdl
            boundary_conditions/
                case_001.inp
                case_002.inp
                ...
        results/
            mission_case_001.db
            mission_case_001.rst
            mission_case_001.out
            mission_case_001.err
            mission_case_002.db
            mission_case_002.rst
            mission_case_002.out
            mission_case_002.err
            ...

…where each mission case is run independently in the SConscript file.

I might give scons/waves another go for my next model. Thanks again!

-Chris

From: Brindley, Kyle Andrew <kbrindley at lanl.gov<mailto:kbrindley at lanl.gov>>
Sent: Thursday, May 11, 2023 2:16 PM
To: scons-users at scons.org<mailto:scons-users at scons.org>
Subject: EXT: Re: [Scons-users] SCons for Ansys APDL Analysis

WARNING: This email originated from outside of GE. Please validate the sender's email address before clicking on links or attachments as they may not be safe.

Christopher,

I’m an R&D engineer from the Advanced Engineering Analysis group at Los Alamos National Laboratory (LANL). My background is computational materials science and structural analysis. I lead the WAVES software project with the goal of providing workflow automation for engineering analysis parametric studies. WAVES is developed by a small team of computer scientists and R&D engineers and our primary target audience is the engineering analysts in our group.

A colleague stumbled on your October 2022 email to the SCons users listserv “SCons for Ansys APDL Analysis” here: https://pairlist4.pair.net/pipermail/scons-users/2022-October/009077.html

It was a timely email, but I had not yet joined the SCons listserv. We started the WAVES project in April 2022 to manage engineering simulation dependencies exactly as you describe, with the first open-source release this past January. We have a small, but growing internal user base that has used SCons and WAVES to good effect. My group at LANL primarily uses Abaqus, so the builders and tutorials are Abaqus-centric, but I believe you could adopt the software to Ansys using the examples.


  *   GitHub: https://github.com/lanl/waves
  *   GitHub-Pages: https://lanl.github.io/waves/

While LANL does have some Ansys users, I can’t promise Ansys or external support at this time. However, I would be happy to learn about your use cases, hear about your experiences adapting SCons to engineering analysis, and discuss any feedback you may have.

Regards,


[signature_61897647]

Kyle Brindley, PhD
R&D Engineer
Advanced Engineering Analysis
pronouns: he/him/his

Los Alamos National Laboratory
lanl.gov

[signature_2770465158]<https://www.instagram.com/losalamosnatlab/>[signature_954204818]<https://twitter.com/LosAlamosNatLab>[signature_314665]<https://www.linkedin.com/company/los-alamos-national-laboratory>[signature_1590606376]<https://www.facebook.com/LosAlamosNationalLab/>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20231104/73a072cc/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 9560 bytes
Desc: image001.png
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20231104/73a072cc/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 2866 bytes
Desc: image002.png
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20231104/73a072cc/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 2234 bytes
Desc: image003.png
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20231104/73a072cc/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 1971 bytes
Desc: image004.png
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20231104/73a072cc/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 1522 bytes
Desc: image005.png
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20231104/73a072cc/attachment-0009.png>


More information about the Scons-users mailing list