generated from ansys/template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into release/0.4
- Loading branch information
Showing
13 changed files
with
234 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Start PyDYNA preprocessing server locally | ||
========================================= | ||
|
||
There are two ways to start the PyDYNA preprocessing server | ||
|
||
1.Start server manually | ||
----------------------- | ||
|
||
* Run this command in the current folder: | ||
|
||
.. code:: console | ||
python kwserver.py | ||
2.Start server automatically | ||
---------------------------- | ||
|
||
Start server on Windows | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
#. Set environment variable: | ||
|
||
.. code:: bash | ||
Variable name: ANSYS_PYDYNA_PRE_SERVER_PATH | ||
variable value: <The file path of this package> | ||
example of variable value: C:\pydyna\ansys-pydyna-pre-server | ||
Start server on Linux | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
#. Set environment variable: | ||
|
||
.. code:: bash | ||
ANSYS_PYDYNA_PRE_SERVER_PATH=<The file path of this package> | ||
example of variable value: /home/lstc/ansys-pydyna-pre-server | ||
Run an example on the client side | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. code:: bash | ||
hostname = "localhost" | ||
if len(sys.argv) > 1: | ||
hostname = sys.argv[1] | ||
solution = DynaSolution(hostname) | ||
...... | ||
#. The function of DynaSolution() can start the preprocessing server automatically. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
Start PyDYNA solver server locally | ||
================================== | ||
|
||
Prerequisites | ||
------------- | ||
|
||
Start server on Windows | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
#. If you want to start the server on Windows,please ensure that you have installed the ANSYS locally. | ||
|
||
Start server on Linux(Centos7) | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
#. If you want to start the server on Linux,please ensure that you have installed the Open MPI package. | ||
|
||
.. code:: bash | ||
yum install openmpi3 openmpi3-dev | ||
#. set environment variable for Open MPI | ||
|
||
.. code:: bash | ||
export LD_LIBRARY_PATH=/usr/lib64/openmpi3/lib:$LD_LIBRARY_PATH | ||
export PATH=/usr/lib64/openmpi3/bin:$PATH | ||
There are two ways to start the PyDYNA solver server | ||
==================================================== | ||
|
||
1.Start server manually | ||
----------------------- | ||
|
||
* Run this command in the current folder: | ||
|
||
.. code:: console | ||
python server.py | ||
2.Start Server Automatically | ||
---------------------------- | ||
|
||
Start Server On Windows | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
#. Set environment variable: | ||
|
||
.. code:: bash | ||
Variable name: ANSYS_PYDYNA_SOLVER_SERVER_PATH | ||
variable value: <The file path of this package> | ||
example of variable value: C:\pydyna\ansys-pydyna-solver-server | ||
Start Server on Linux(Centos7) | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
#. Set environment variable: | ||
|
||
.. code:: bash | ||
ANSYS_PYDYNA_SOLVER_SERVER_PATH=<The file path of this package> | ||
example of variable value: /home/lstc/ansys-pydyna-solver-server | ||
Run an example on the client side | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. code:: bash | ||
import ansys.dyna.core.solver as solver | ||
hostname = "localhost" | ||
port = "5000" | ||
dyna=solver.DynaSolver(hostname,port) # connect to the server | ||
dyna.push("./output/ball_plate.k") # push an input file | ||
dyna.start_locally(input = "ball_plate.k",nproc=1) | ||
#. The function of DynaSolver() can start the solver server automatically. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.