Skip to content

Conversation

@pmaroneh
Copy link
Contributor

This PR was originally created for the pymapdl repo but I'm moving it here as the tech demos have been moved to another repo.
Link to initial PR.
In this PR, I would like to add a new example, taken from Chapter 21 of the Mechanical APDL Technology Showcase Manual. This examples shows how to use PyMAPDL to import an existing FE model and to perform a nonlinear buckling and postbuckling analysis using nonlinear stabilization. The problem uses a stiffened cylinder subjected to uniform external pressure to show how to find the nonlinear buckling loads, achieve convergence at the post-buckling stage, and interpret the results.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Nov 30, 2022
@pmaroneh pmaroneh marked this pull request as draft November 30, 2022 09:24
@github-actions github-actions bot added the maintenance Package and maintenance related label Dec 1, 2022
@RobPasMue
Copy link
Member

Hi @pmaroneh I just saw that the code-style checks where failing due to a missing "ignored" word (i.e. filname). It should run the workflow now.

@pmaroneh
Copy link
Contributor Author

pmaroneh commented Dec 1, 2022

Hi @RobPasMue, thanks a lot for correcting this.
I'm wondering how the examples from the tech demos are now run to generate the html files? My model takes a very long time to run (few hours) so I'm not sure how it will be rendered.
Also I tried to rerun it locally and faced (again) some issues that I thought I had resolved, see this discussion for context. I will try to take into account suggestions from @germa89 today.

@pmaroneh
Copy link
Contributor Author

pmaroneh commented Dec 1, 2022

Hi again @RobPasMue , sorry, another question, related to the one above. This examples requires a .cdb file to be read. Where should I place this .cdb file? Thanks

@pmaroneh
Copy link
Contributor Author

pmaroneh commented Dec 1, 2022

Hi again again @RobPasMue , I can't figure out what the code style check is failing at now, would you mind helping me out? Many thanks.

@RobPasMue
Copy link
Member

RobPasMue commented Dec 1, 2022

Hi @pmaroneh! Sorry, I was focused on other topics =)

  • Regarding the .cdb file, I think you can add it in the same folder as your techdemo. That should be enough =)
  • Code style stage is failing because of the following error:
--- a/doc/source/technology_showcase_examples/techdemo-21/21-example-technology-showcase-buckling.py
+++ b/doc/source/technology_showcase_examples/techdemo-21/21-example-technology-showcase-buckling.py
@@ -2[70](https://github.com/pyansys/pymapdl-techdemos/actions/runs/3591741195/jobs/6046635959#step:5:71),7 +270,7 @@ mapdl.nsubst(100, 10000, 10)
 mapdl.rescontrol("define", "all", 1)
 mapdl.outres("all", "all")
 mapdl.ncnv(2)  # Do not terminate the program execution if the solution diverges
-mapdl.ignore_errors = True # in order for PyMAPDL to not raise an error 
+mapdl.ignore_errors = True  # in order for PyMAPDL to not raise an error
 output = mapdl.solve()
 print(output)
 mapdl.finish()

You just need to add a space in True # so that it looks like True # (with two spaces in between). Another option is for you to run pre-commit run and commit the suggestions that pre-commit provides you :)

@germa89
Copy link
Contributor

germa89 commented Dec 1, 2022

I'm taking steps to fix some issues here @pmaroneh. Wait for my input please.

@pmaroneh
Copy link
Contributor Author

I'm taking steps to fix some issues here @pmaroneh. Wait for my input please.

Hi @germa89 do you have updates on this?

@germa89
Copy link
Contributor

germa89 commented Dec 12, 2022

I'm taking steps to fix some issues here @pmaroneh. Wait for my input please.

Hi @germa89 do you have updates on this?

I'm actually working on this.

@germa89
Copy link
Contributor

germa89 commented Mar 14, 2023

I added the bits needed for the techdemos folder to run in here:

61aff02

Can @clatapie check this when you have some time?

@pmaroneh pmaroneh marked this pull request as ready for review March 14, 2023 13:29
Copy link
Contributor Author

@pmaroneh pmaroneh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taken into account

@ansys ansys deleted a comment from RobPasMue Mar 14, 2023
@pmaroneh pmaroneh requested review from clatapie and germa89 March 14, 2023 13:33
Copy link
Collaborator

@clatapie clatapie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @pmaroneh for submitting this example!
I left you some comments about the organization of that repository that need to be followed because of the model size presented in the TechDemos.
Feel free to contact us for any question that you may have.

@germa89
Copy link
Contributor

germa89 commented Mar 22, 2023

@pmaroneh @clatapie

I do remember to have said to Camille we will only accepts RST files for the repos. However, because this example is already finished and we do not have any guidance on how to do the RST files, let's gonna skip this one.
Also, the sphinx cache should detect that there is no changes in the python file and hence, it should not rerun it (assuming the sphinx cache is in place).

So yeah @clatapie , let's merge this one when ready. Apologies for keep changing the directives!

Copy link
Collaborator

@clatapie clatapie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you @pmaroneh for this example 👍

@clatapie clatapie requested a review from germa89 March 23, 2023 13:20
Copy link
Contributor

@germa89 germa89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But let's see once deployed.

@germa89 germa89 merged commit aad30e7 into main Mar 23, 2023
@germa89 germa89 deleted the doc/tech_demos_21buckling_pmh branch March 23, 2023 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation maintenance Package and maintenance related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants