MOR in Ansys using APDL math

865 views
Skip to first unread message

clappertown

unread,
Mar 8, 2012, 12:21:12 AM3/8/12
to mor4ansys
Just want to share my experience of doing MOR directly in Ansys. Ansys
13 introduced APDL math that allows user to use its internal solver by
simply importing user defined system matrices to solve AX=B. The APDL
math provides lots of functions to create/import sparse/dense matrix/
vector from .full file or external data file, matrix multiplication,
linear solver, and export matrix to file. Therefore, one can get
subspace matrices directly using APDL language without using external
solver like MUMPS. For instance, MOR for a 1000k nodes model can be
easily done in Ansys.

Guilherme Torri

unread,
Mar 8, 2012, 3:22:59 AM3/8/12
to mor4...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "mor4ansys" group.
To post to this group, send email to mor4...@googlegroups.com.
To unsubscribe from this group, send email to mor4ansys+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mor4ansys?hl=en.


Hi clappertown,

Very interesting point. I rather often use APDL and didn't know about this feature of using the internal solvers to solve user defined systems.
Would you be willing to post (or send in private) some snippet of code that illustrates your approach? If not, nice finding anyway!

Best regards,
--
Guilherme

Evgenii Rudnyi

unread,
Mar 8, 2012, 3:40:09 AM3/8/12
to mor4...@googlegroups.com
Indeed. Right now it could be a good option. Could you please share what
timing do you achieve for example for 1M model? It would be nice if you
spit steps in the Arnoldi algorithm and provided timing for each step.

Evgenii

P.S. Export in Matrix Market does not work correctly, also in 14, so one
have to use some other format. The HB format seems being the most robust.

On 08.03.2012 06:21 clappertown said the following:

Michael

unread,
Mar 8, 2012, 6:48:02 AM3/8/12
to mor4...@googlegroups.com
Hi!

Thanks for sharing your experience with Ansys/APDL-Math.
Did you apply your approach to a nonlinear analysis as well?
I am interested in doing MOR in Ansys but until now did not succeed using APDL-Math commands to extract the system matrices for my nonlinear analysis (from .full file).

Michael

Evgenii Rudnyi

unread,
Mar 8, 2012, 9:40:21 AM3/8/12
to mor4...@googlegroups.com
You can try nncv, for example

/solu
antype,static
eqslv,sparse
solve
*get,nn,active,0,solu,ncmit
ncnv,2,,nn+1
solve
fini

Alternatively, you can try psolve

/solu
eqslv,sparse
psolve,elform
psolve,elprep
wrfull,1
psolve,triang
fini

On 08.03.2012 12:48 Michael said the following:

clappertown

unread,
Mar 8, 2012, 9:58:24 PM3/8/12
to mor4ansys
Here are the timings vs. node # for the same first-order thermal model
using APDL math vs external MUMPS linear sparse solver (with METIS
ordering and complied in 32bits) with different mesh size, on Windows
7 64 bits:


METHOD              Node#   Matrix factorization           Arnoldi
process for 5 vectors

MUMPS solver      166K           34s                                5s
APDL Math           166K           16s                              
 1s

MUMPS solver      396K         161s                              16s
APDL Math           396K           72s                              
 2s

MUMPS solver      488K         INFO(1) = -13 : error occurred in
Fortran ALLOCATE statement.
APDL Math           488K         119s                              
 2s

MUMPS solver      665K         INFO(1) = -13 : error occurred in
Fortran ALLOCATE statement.
APDL Math           665K         242s                              
 4s

MUMPS solver    1290K         INFO(1) = -13 : error occurred in
Fortran ALLOCATE statement.
APDL Math         1290K         745s                                5s

The factorization process consumes the most of the time using DSP
(distributed sparse solver) option.  So for 1M node, the total MOR
time should be less than 600s.

The APDL math code to implement Arnoldi algorithm is straightforward
by modifying the examples in Ansys help, since it provides all the
functions for solving equations and matrix operations.

*Export in HB format seems only work for sparse matrix but not the
dense one, so I ended up with exporting them to APDL array parameters
for file output .

ilm...@gmail.com

unread,
Oct 14, 2013, 11:48:47 AM10/14/13
to mor4...@googlegroups.com
Could you please give some hints on how to do that?
How can I define the stiffness matrix and use it for 
computations in ANSYS without exporting it?

Thanks,

Marco
Reply all
Reply to author
Forward
0 new messages