[WB] Drive Workbench from external program

CA
Caba, Aaron (US)
Tue, Jan 25, 2022 6:47 PM

I have a WB project I'm using in a fluid-structure interaction loop with an external CFD code.  The external code is orchestrating the solve loops.  It calls WB with:
"runwb2 -B -R SolveForDisplacement.wbjn"
to update the project and save some CSV files with displacements. This is working great, except for the overhead of opening WB every time.  It takes about 65 seconds for the whole process, where 5 seconds are ANSYS and the other 60 are opening & closing WB.  When the solution requires ~60-80 iterations to converge, that's and extra hour of wall clock time.

Is there a way to connect to a running WB session and send it commands?

Another option would be to re-write the file-read/map/solve/save as APDL commands and avoid the overhead, but I'm more interested in the GUI option for now.

Aaron C. Caba, Ph.D.
Sr. Principal R&D Engineer II
BAE Systems, Inc. | Ordnance Systems, Inc.

Office: +1 540 639 7086  |  Mobile: +1 540 230 3906  |  E-mail: aaron.caba@baesystems.com | Mail:  4050 Peppers Ferry Road, Radford VA 24143-0100
www.baesystems.com

I have a WB project I'm using in a fluid-structure interaction loop with an external CFD code. The external code is orchestrating the solve loops. It calls WB with: "runwb2 -B -R SolveForDisplacement.wbjn" to update the project and save some CSV files with displacements. This is working great, except for the overhead of opening WB every time. It takes about 65 seconds for the whole process, where 5 seconds are ANSYS and the other 60 are opening & closing WB. When the solution requires ~60-80 iterations to converge, that's and extra hour of wall clock time. Is there a way to connect to a running WB session and send it commands? Another option would be to re-write the file-read/map/solve/save as APDL commands and avoid the overhead, but I'm more interested in the GUI option for now. Aaron C. Caba, Ph.D. Sr. Principal R&D Engineer II BAE Systems, Inc. | Ordnance Systems, Inc. Office: +1 540 639 7086  |  Mobile: +1 540 230 3906  |  E-mail: aaron.caba@baesystems.com | Mail: 4050 Peppers Ferry Road, Radford VA 24143-0100 www.baesystems.com
AS
Andrew Sims
Thu, Jan 27, 2022 12:23 PM

Aaron

Sounds an interesting problem and one that may have relevance to some work we might want to do in the future with coupled solves.

Sorry I cannot offer a further suggestion for connecting to a running WB session. Reading your post, my first thought was APDL.

Another thought - would the System Coupling interface be of any help here - but I guess you have the solution governed from the other software, so maybe not.

Good luck.

Andrew Sims
ResMed

-----Original Message-----
From: Caba, Aaron (US) via Xansys xansys-temp@list.xansys.org
Sent: Wednesday, 26 January 2022 5:47 AM
To: XANSYS Mailing List Home xansys-temp@list.xansys.org
Cc: Caba, Aaron (US) Aaron.Caba@baesystems.com
Subject: [External] [Xansys] [WB] Drive Workbench from external program

I have a WB project I'm using in a fluid-structure interaction loop with an external CFD code.  The external code is orchestrating the solve loops.  It calls WB with:
"runwb2 -B -R SolveForDisplacement.wbjn"
to update the project and save some CSV files with displacements. This is working great, except for the overhead of opening WB every time.  It takes about 65 seconds for the whole process, where 5 seconds are ANSYS and the other 60 are opening & closing WB.  When the solution requires ~60-80 iterations to converge, that's and extra hour of wall clock time.

Is there a way to connect to a running WB session and send it commands?

Another option would be to re-write the file-read/map/solve/save as APDL commands and avoid the overhead, but I'm more interested in the GUI option for now.

Aaron C. Caba, Ph.D.
Sr. Principal R&D Engineer II
BAE Systems, Inc. | Ordnance Systems, Inc.

Office: +1 540 639 7086  |  Mobile: +1 540 230 3906  |  E-mail: aaron.caba@baesystems.com | Mail:  4050 Peppers Ferry Road, Radford VA 24143-0100 www.baesystems.com _______________________________________________
Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an email to xansys-temp-leave@list.xansys.org If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day.

Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list

Caution: This email originated outside of ResMed's email system. Do not click on links or attachments unless you recognize the sender and know the content is safe.


Warning:  Copyright ResMed.  Where the contents of this email and/or attachment includes materials prepared by ResMed, the use of those materials is subject exclusively to the conditions of engagement between ResMed and the intended recipient.

This communication is confidential and may contain legally privileged information. By the use of email over the Internet or other communication systems, ResMed is not waiving either confidentiality of, or legal privilege in, the content of the email and of any attachments. If the recipient of this message is not the intended addressee, please call ResMed immediately on +61 2 8884 1000 Sydney, Australia.

Aaron Sounds an interesting problem and one that may have relevance to some work we might want to do in the future with coupled solves. Sorry I cannot offer a further suggestion for connecting to a running WB session. Reading your post, my first thought was APDL. Another thought - would the System Coupling interface be of any help here - but I guess you have the solution governed from the other software, so maybe not. Good luck. Andrew Sims ResMed -----Original Message----- From: Caba, Aaron (US) via Xansys <xansys-temp@list.xansys.org> Sent: Wednesday, 26 January 2022 5:47 AM To: XANSYS Mailing List Home <xansys-temp@list.xansys.org> Cc: Caba, Aaron (US) <Aaron.Caba@baesystems.com> Subject: [External] [Xansys] [WB] Drive Workbench from external program I have a WB project I'm using in a fluid-structure interaction loop with an external CFD code. The external code is orchestrating the solve loops. It calls WB with: "runwb2 -B -R SolveForDisplacement.wbjn" to update the project and save some CSV files with displacements. This is working great, except for the overhead of opening WB every time. It takes about 65 seconds for the whole process, where 5 seconds are ANSYS and the other 60 are opening & closing WB. When the solution requires ~60-80 iterations to converge, that's and extra hour of wall clock time. Is there a way to connect to a running WB session and send it commands? Another option would be to re-write the file-read/map/solve/save as APDL commands and avoid the overhead, but I'm more interested in the GUI option for now. Aaron C. Caba, Ph.D. Sr. Principal R&D Engineer II BAE Systems, Inc. | Ordnance Systems, Inc. Office: +1 540 639 7086  |  Mobile: +1 540 230 3906  |  E-mail: aaron.caba@baesystems.com | Mail: 4050 Peppers Ferry Road, Radford VA 24143-0100 www.baesystems.com _______________________________________________ Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an email to xansys-temp-leave@list.xansys.org If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day. Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list Caution: This email originated outside of ResMed's email system. Do not click on links or attachments unless you recognize the sender and know the content is safe. ---------------------------------------------------------------------- Warning: Copyright ResMed. Where the contents of this email and/or attachment includes materials prepared by ResMed, the use of those materials is subject exclusively to the conditions of engagement between ResMed and the intended recipient. This communication is confidential and may contain legally privileged information. By the use of email over the Internet or other communication systems, ResMed is not waiving either confidentiality of, or legal privilege in, the content of the email and of any attachments. If the recipient of this message is not the intended addressee, please call ResMed immediately on +61 2 8884 1000 Sydney, Australia.
CA
Caba, Aaron (US)
Fri, Jan 28, 2022 4:35 PM

Andrew,

I'm coupling between STAR-CCM+ for CFD and Mechanical using simple CSV file transfers on the Fluid/structure surfaces - ANSYS writes out displacements, STAR writes out surface tractions.

Using WB with an External Data node to read the tractions into ANSYS is sooooo easy.  No scripting and it just works.  All the other file transfers required APDL/JavaScript and mucking about with formatting etc.

I put in a request to ANSYS support about driving WB and I'll let you know what I find out.

Aaron C. Caba, Ph.D.
Sr. Principal R&D Engineer II
BAE Systems, Inc. | Ordnance Systems, Inc.

E-mail: aaron.caba@baesystems.com | Mail:  4050 Peppers Ferry Road, Radford VA 24143-0100
www.baesystems.com

Andrew, I'm coupling between STAR-CCM+ for CFD and Mechanical using simple CSV file transfers on the Fluid/structure surfaces - ANSYS writes out displacements, STAR writes out surface tractions. Using WB with an External Data node to read the tractions into ANSYS is sooooo easy. No scripting and it just works. All the other file transfers required APDL/JavaScript and mucking about with formatting etc. I put in a request to ANSYS support about driving WB and I'll let you know what I find out. Aaron C. Caba, Ph.D. Sr. Principal R&D Engineer II BAE Systems, Inc. | Ordnance Systems, Inc. E-mail: aaron.caba@baesystems.com | Mail: 4050 Peppers Ferry Road, Radford VA 24143-0100 www.baesystems.com
CA
Caba, Aaron (US)
Thu, Feb 10, 2022 11:23 PM

Here's a follow-up and another question.  Apparently you can drive MAPDL and WB from Matlab using the Ansys as a Service (AaaS) toolbox.  Check out Ansys knowledge solutions 2057025, 2058573 on the Ansys Customer Portal.  It looks pretty cool, if you are using Matlab.  You can also drive MAPDL from Python.  See help page (https://ansyshelp.ansys.com): "Mechanical APDL > Mechanical APDL as a Server User's Guide"
https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v221/en/ans_aas/ans_aas.html

My new question is how to read in a CSV of point forces, and map them to the structural model.  I've given up on using the WB interface at this point because it is giving me fits on my Linux cluster.  So I'm going to try using APDL to do the file read/mapping/solve.

The point force CSV is from my CFD solution, but is on a different mesh than my mechanical simulation.  So the forces need to be mapped to the surfaces/nodes of the mechanical model.  These are forces at discrete points, not a field, so the interpolation would need to conserve the total force applied.

The CSV is a point cloud of information, with a force-vector/location pair.  No mesh information.
"Traction[i] (N)","Traction[j] (N)","Traction[k] (N)","X (mm)","Y (mm)","Z (mm)"
0.0175519044288876,-0.133241618707105,0.36252376963303,8.48947164677622,-1.67156843232078,0.72804856562505
0.0174687670479826,-0.0665973630469475,0.379089332635947,8.58245092723447,-1.72662388432779,0.713273877000037

Does anyone have suggestions on how to read this into MAPDL, then do the mapping?  For the file read, I looked up *TREAD, but this data is not ordered, it's just a point cloud.  I could massage the CSV data into a better format if it would make it easier to read into MAPDL.

For the mapping, is this a *MOPER,,,MAP thing?  Would that map from my point forces to forces on each node?  I am thinking a loop that does:
Loop over all force/location pairs
Find element surface that contains location with ???
Distribute force over nodes with ?shape functions?
Apply forces to nodes with f,<node #>,fx,<portion of force on node>
End loop

Thanks in advance,
Aaron

Aaron C. Caba, Ph.D.
Sr. Principal R&D Engineer II
BAE Systems, Inc. | Ordnance Systems, Inc.

E-mail: aaron.caba@baesystems.com | Mail:  4050 Peppers Ferry Road, Radford VA 24143-0100
www.baesystems.com

-----Original Message-----
From: Caba, Aaron (US) via Xansys xansys-temp@list.xansys.org

I have a WB project I'm using in a fluid-structure interaction loop with an external CFD code.  The external code is orchestrating the solve loops.  It calls WB with:
"runwb2 -B -R SolveForDisplacement.wbjn"
to update the project and save some CSV files with displacements. This is working great, except for the overhead of opening WB every time.  It takes about 65 seconds for the whole process, where 5 seconds are ANSYS and the other 60 are opening & closing WB.  When the solution requires ~60-80 iterations to converge, that's and extra hour of wall clock time.

Is there a way to connect to a running WB session and send it commands?

Another option would be to re-write the file-read/map/solve/save as APDL commands and avoid the overhead, but I'm more interested in the GUI option for now.

Aaron C. Caba, Ph.D.
Sr. Principal R&D Engineer II
BAE Systems, Inc. | Ordnance Systems, Inc.

Office: +1 540 639 7086  |  Mobile: +1 540 230 3906  |  E-mail: aaron.caba@baesystems.com | Mail:  4050 Peppers Ferry Road, Radford VA 24143-0100
www.baesystems.com


Xansys mailing list -- xansys-temp@list.xansys.org
To unsubscribe send an email to xansys-temp-leave@list.xansys.org
If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day.

Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list

Here's a follow-up and another question. Apparently you can drive MAPDL and WB from Matlab using the Ansys as a Service (AaaS) toolbox. Check out Ansys knowledge solutions 2057025, 2058573 on the Ansys Customer Portal. It looks pretty cool, if you are using Matlab. You can also drive MAPDL from Python. See help page (https://ansyshelp.ansys.com): "Mechanical APDL > Mechanical APDL as a Server User's Guide" https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v221/en/ans_aas/ans_aas.html My new question is how to read in a CSV of point forces, and map them to the structural model. I've given up on using the WB interface at this point because it is giving me fits on my Linux cluster. So I'm going to try using APDL to do the file read/mapping/solve. The point force CSV is from my CFD solution, but is on a different mesh than my mechanical simulation. So the forces need to be mapped to the surfaces/nodes of the mechanical model. These are forces at discrete points, not a field, so the interpolation would need to conserve the total force applied. The CSV is a point cloud of information, with a force-vector/location pair. No mesh information. "Traction[i] (N)","Traction[j] (N)","Traction[k] (N)","X (mm)","Y (mm)","Z (mm)" 0.0175519044288876,-0.133241618707105,0.36252376963303,8.48947164677622,-1.67156843232078,0.72804856562505 0.0174687670479826,-0.0665973630469475,0.379089332635947,8.58245092723447,-1.72662388432779,0.713273877000037 Does anyone have suggestions on how to read this into MAPDL, then do the mapping? For the file read, I looked up *TREAD, but this data is not ordered, it's just a point cloud. I could massage the CSV data into a better format if it would make it easier to read into MAPDL. For the mapping, is this a *MOPER,,,MAP thing? Would that map from my point forces to forces on each node? I am thinking a loop that does: Loop over all force/location pairs Find element surface that contains location with ??? Distribute force over nodes with ?shape functions? Apply forces to nodes with f,<node #>,fx,<portion of force on node> End loop Thanks in advance, Aaron Aaron C. Caba, Ph.D. Sr. Principal R&D Engineer II BAE Systems, Inc. | Ordnance Systems, Inc. E-mail: aaron.caba@baesystems.com | Mail: 4050 Peppers Ferry Road, Radford VA 24143-0100 www.baesystems.com -----Original Message----- From: Caba, Aaron (US) via Xansys <xansys-temp@list.xansys.org> I have a WB project I'm using in a fluid-structure interaction loop with an external CFD code. The external code is orchestrating the solve loops. It calls WB with: "runwb2 -B -R SolveForDisplacement.wbjn" to update the project and save some CSV files with displacements. This is working great, except for the overhead of opening WB every time. It takes about 65 seconds for the whole process, where 5 seconds are ANSYS and the other 60 are opening & closing WB. When the solution requires ~60-80 iterations to converge, that's and extra hour of wall clock time. Is there a way to connect to a running WB session and send it commands? Another option would be to re-write the file-read/map/solve/save as APDL commands and avoid the overhead, but I'm more interested in the GUI option for now. Aaron C. Caba, Ph.D. Sr. Principal R&D Engineer II BAE Systems, Inc. | Ordnance Systems, Inc. Office: +1 540 639 7086 |  Mobile: +1 540 230 3906 |  E-mail: aaron.caba@baesystems.com | Mail: 4050 Peppers Ferry Road, Radford VA 24143-0100 www.baesystems.com _______________________________________________ Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an email to xansys-temp-leave@list.xansys.org If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day. Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list
SK
Sze Kwan Cheah
Fri, Feb 11, 2022 1:38 AM

Hi Aaron,

I don't have a solution for CSV file but I'm inferring that you are using
Matlab (or Python) to write the CSV file and reading in with APDL. If you
are open to a different file format, Matrix Market might work for you:
https://math.nist.gov/MatrixMarket/mmio/matlab/mmiomatlab.html

The above website are for Matlab functions. For Python, it's built inside
SciPy with scipy.io.mmwrite.

In Ansys, you may try reading in the MTX file with a snippet like this:
*dmat, importmatrix, d, import, mmf, toansys.mtx ! imports
*dim, fromMatlab, array, 10, 10 ! Need pre-defined matrix size
*export, importmatrix, apdl, fromMatlab, 1, 10 ! writes out to apdl named
fromMatlab, 1st column to 10th column
q = fromMatlab(3, 4) ! Test validity
*stat, q

Best regards,
Sze Kwan (Jason) Cheah
University of Minnesota

On Thu, Feb 10, 2022 at 5:24 PM Caba, Aaron (US) via Xansys <
xansys-temp@list.xansys.org> wrote:

Here's a follow-up and another question.  Apparently you can drive MAPDL
and WB from Matlab using the Ansys as a Service (AaaS) toolbox.  Check out
Ansys knowledge solutions 2057025, 2058573 on the Ansys Customer Portal.
It looks pretty cool, if you are using Matlab.  You can also drive MAPDL
from Python.  See help page (https://ansyshelp.ansys.com): "Mechanical
APDL > Mechanical APDL as a Server User's Guide"

https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v221/en/ans_aas/ans_aas.html

My new question is how to read in a CSV of point forces, and map them to
the structural model.  I've given up on using the WB interface at this
point because it is giving me fits on my Linux cluster.  So I'm going to
try using APDL to do the file read/mapping/solve.

The point force CSV is from my CFD solution, but is on a different mesh
than my mechanical simulation.  So the forces need to be mapped to the
surfaces/nodes of the mechanical model.  These are forces at discrete
points, not a field, so the interpolation would need to conserve the total
force applied.

The CSV is a point cloud of information, with a force-vector/location
pair.  No mesh information.
"Traction[i] (N)","Traction[j] (N)","Traction[k] (N)","X (mm)","Y (mm)","Z
(mm)"

0.0175519044288876,-0.133241618707105,0.36252376963303,8.48947164677622,-1.67156843232078,0.72804856562505

0.0174687670479826,-0.0665973630469475,0.379089332635947,8.58245092723447,-1.72662388432779,0.713273877000037

Does anyone have suggestions on how to read this into MAPDL, then do the
mapping?  For the file read, I looked up *TREAD, but this data is not
ordered, it's just a point cloud.  I could massage the CSV data into a
better format if it would make it easier to read into MAPDL.

For the mapping, is this a *MOPER,,,MAP thing?  Would that map from my
point forces to forces on each node?  I am thinking a loop that does:
Loop over all force/location pairs
Find element surface that contains location with ???
Distribute force over nodes with ?shape functions?
Apply forces to nodes with f,<node #>,fx,<portion of force on node>
End loop

Thanks in advance,
Aaron

Aaron C. Caba, Ph.D.
Sr. Principal R&D Engineer II
BAE Systems, Inc. | Ordnance Systems, Inc.

E-mail: aaron.caba@baesystems.com | Mail:  4050 Peppers Ferry Road,
Radford VA 24143-0100
www.baesystems.com

-----Original Message-----
From: Caba, Aaron (US) via Xansys xansys-temp@list.xansys.org

I have a WB project I'm using in a fluid-structure interaction loop with
an external CFD code.  The external code is orchestrating the solve loops.
It calls WB with:
"runwb2 -B -R SolveForDisplacement.wbjn"
to update the project and save some CSV files with displacements. This is
working great, except for the overhead of opening WB every time.  It takes
about 65 seconds for the whole process, where 5 seconds are ANSYS and the
other 60 are opening & closing WB.  When the solution requires ~60-80
iterations to converge, that's and extra hour of wall clock time.

Is there a way to connect to a running WB session and send it commands?

Another option would be to re-write the file-read/map/solve/save as APDL
commands and avoid the overhead, but I'm more interested in the GUI option
for now.

Aaron C. Caba, Ph.D.
Sr. Principal R&D Engineer II
BAE Systems, Inc. | Ordnance Systems, Inc.

Office: +1 540 639 7086  |  Mobile: +1 540 230 3906  |  E-mail:
aaron.caba@baesystems.com | Mail:  4050 Peppers Ferry Road, Radford VA
24143-0100
www.baesystems.com


Xansys mailing list -- xansys-temp@list.xansys.org
To unsubscribe send an email to xansys-temp-leave@list.xansys.org
If you are receiving too many emails from XANSYS please consider changing
account settings to Digest mode which will send a single email per day.

Please send administrative requests such as deletion from XANSYS to
xansys-mod@tynecomp.co.uk and not to the list


Xansys mailing list -- xansys-temp@list.xansys.org
To unsubscribe send an email to xansys-temp-leave@list.xansys.org
If you are receiving too many emails from XANSYS please consider changing
account settings to Digest mode which will send a single email per day.

Please send administrative requests such as deletion from XANSYS to
xansys-mod@tynecomp.co.uk and not to the list

Hi Aaron, I don't have a solution for CSV file but I'm inferring that you are using Matlab (or Python) to write the CSV file and reading in with APDL. If you are open to a different file format, Matrix Market might work for you: https://math.nist.gov/MatrixMarket/mmio/matlab/mmiomatlab.html The above website are for Matlab functions. For Python, it's built inside SciPy with scipy.io.mmwrite. In Ansys, you may try reading in the MTX file with a snippet like this: *dmat, importmatrix, d, import, mmf, toansys.mtx ! imports *dim, fromMatlab, array, 10, 10 ! Need pre-defined matrix size *export, importmatrix, apdl, fromMatlab, 1, 10 ! writes out to apdl named fromMatlab, 1st column to 10th column q = fromMatlab(3, 4) ! Test validity *stat, q Best regards, Sze Kwan (Jason) Cheah University of Minnesota On Thu, Feb 10, 2022 at 5:24 PM Caba, Aaron (US) via Xansys < xansys-temp@list.xansys.org> wrote: > Here's a follow-up and another question. Apparently you can drive MAPDL > and WB from Matlab using the Ansys as a Service (AaaS) toolbox. Check out > Ansys knowledge solutions 2057025, 2058573 on the Ansys Customer Portal. > It looks pretty cool, if you are using Matlab. You can also drive MAPDL > from Python. See help page (https://ansyshelp.ansys.com): "Mechanical > APDL > Mechanical APDL as a Server User's Guide" > > https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v221/en/ans_aas/ans_aas.html > > My new question is how to read in a CSV of point forces, and map them to > the structural model. I've given up on using the WB interface at this > point because it is giving me fits on my Linux cluster. So I'm going to > try using APDL to do the file read/mapping/solve. > > The point force CSV is from my CFD solution, but is on a different mesh > than my mechanical simulation. So the forces need to be mapped to the > surfaces/nodes of the mechanical model. These are forces at discrete > points, not a field, so the interpolation would need to conserve the total > force applied. > > The CSV is a point cloud of information, with a force-vector/location > pair. No mesh information. > "Traction[i] (N)","Traction[j] (N)","Traction[k] (N)","X (mm)","Y (mm)","Z > (mm)" > > 0.0175519044288876,-0.133241618707105,0.36252376963303,8.48947164677622,-1.67156843232078,0.72804856562505 > > 0.0174687670479826,-0.0665973630469475,0.379089332635947,8.58245092723447,-1.72662388432779,0.713273877000037 > > Does anyone have suggestions on how to read this into MAPDL, then do the > mapping? For the file read, I looked up *TREAD, but this data is not > ordered, it's just a point cloud. I could massage the CSV data into a > better format if it would make it easier to read into MAPDL. > > For the mapping, is this a *MOPER,,,MAP thing? Would that map from my > point forces to forces on each node? I am thinking a loop that does: > Loop over all force/location pairs > Find element surface that contains location with ??? > Distribute force over nodes with ?shape functions? > Apply forces to nodes with f,<node #>,fx,<portion of force on node> > End loop > > > Thanks in advance, > Aaron > > > Aaron C. Caba, Ph.D. > Sr. Principal R&D Engineer II > BAE Systems, Inc. | Ordnance Systems, Inc. > > E-mail: aaron.caba@baesystems.com | Mail: 4050 Peppers Ferry Road, > Radford VA 24143-0100 > www.baesystems.com > > -----Original Message----- > From: Caba, Aaron (US) via Xansys <xansys-temp@list.xansys.org> > > > I have a WB project I'm using in a fluid-structure interaction loop with > an external CFD code. The external code is orchestrating the solve loops. > It calls WB with: > "runwb2 -B -R SolveForDisplacement.wbjn" > to update the project and save some CSV files with displacements. This is > working great, except for the overhead of opening WB every time. It takes > about 65 seconds for the whole process, where 5 seconds are ANSYS and the > other 60 are opening & closing WB. When the solution requires ~60-80 > iterations to converge, that's and extra hour of wall clock time. > > Is there a way to connect to a running WB session and send it commands? > > Another option would be to re-write the file-read/map/solve/save as APDL > commands and avoid the overhead, but I'm more interested in the GUI option > for now. > > Aaron C. Caba, Ph.D. > Sr. Principal R&D Engineer II > BAE Systems, Inc. | Ordnance Systems, Inc. > > Office: +1 540 639 7086 | Mobile: +1 540 230 3906 | E-mail: > aaron.caba@baesystems.com | Mail: 4050 Peppers Ferry Road, Radford VA > 24143-0100 > www.baesystems.com > _______________________________________________ > Xansys mailing list -- xansys-temp@list.xansys.org > To unsubscribe send an email to xansys-temp-leave@list.xansys.org > If you are receiving too many emails from XANSYS please consider changing > account settings to Digest mode which will send a single email per day. > > Please send administrative requests such as deletion from XANSYS to > xansys-mod@tynecomp.co.uk and not to the list > _______________________________________________ > Xansys mailing list -- xansys-temp@list.xansys.org > To unsubscribe send an email to xansys-temp-leave@list.xansys.org > If you are receiving too many emails from XANSYS please consider changing > account settings to Digest mode which will send a single email per day. > > Please send administrative requests such as deletion from XANSYS to > xansys-mod@tynecomp.co.uk and not to the list >
JM
Joe Metrisin
Fri, Feb 11, 2022 11:34 AM

Hi Aaron,

The "external data" object in WB is the best way to map CFD results to a
structural model.  If you insist on doing it in MAPDL, the *MOPER command is
the way to go.  You need to create two arrays of data.  For example:

Struct array is x,y,z coordinates of the structural model nodes you want to
map to.
Cfd array is x,y,z,pressure from your CFD results.
Mapped will be the resulting array with node number and mapped pressure.

*moper, mapped(1,1), struct(1,1), map, cfd(1,4), cfd(1,1), 3,, 0
sffun, pres, mapped(1,1)
sf, all, pres

Joseph T Metrisin
Structures Lead

Florida Turbine Technologies, Inc
1701 Military Tr. Suite 110 | Jupiter, FL 33458 USA
+1 (561) 427-6346 Office | +1 (772) 834-4156 Mobile
Joe.Metrisin@kratosdefense.com

Visit our website: https://kratosdefense.com

Confidentiality Note:
The information contained in this transmission and any attachments are
proprietary and may be privileged, intended only for the use of the
individual or entity named above. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly prohibited.  If
you received this communication in error, please delete the message and
immediately notify the sender via the contact information listed above.

-----Original Message-----
From: Caba, Aaron (US) via Xansys xansys-temp@list.xansys.org
Sent: Thursday, February 10, 2022 6:24 PM
To: XANSYS Mailing List Home xansys-temp@list.xansys.org
Cc: Caba, Aaron (US) Aaron.Caba@baesystems.com
Subject: [External] - [Xansys] Re: [WB] Drive Workbench from external
program

CAUTION: This email originated from outside of the organization. Do not
click links or open attachments unless you recognize the sender and know the
content is safe.

Here's a follow-up and another question.  Apparently you can drive MAPDL and
WB from Matlab using the Ansys as a Service (AaaS) toolbox.  Check out Ansys
knowledge solutions 2057025, 2058573 on the Ansys Customer Portal.  It looks
pretty cool, if you are using Matlab.  You can also drive MAPDL from Python.
See help page
(https://urldefense.proofpoint.com/v2/url?u=https-3A__ansyshelp.ansys.com&d=
DwIFAw&c=zeCCs5WLaN-HWPHrpXwbFoOqeS0G3NH2_2IQ_bzV13g&r=IOkMURQRtftopTCLYWjAB
vdzlGedqVvAMvUyU2Gzs2I&m=g4dZA3aO5eH_v0TLs6Hj9nqVPb3LbRlmRt_wYpwKHwtLGKNUci3
LOUhrjx5oAoNM&s=nlxaggg3sbDN_oyAeqCR7CbblBrkjNZXUQj0oZvVXF4&e= ):
"Mechanical APDL > Mechanical APDL as a Server User's Guide"
https://urldefense.proofpoint.com/v2/url?u=https-3A__ansyshelp.ansys.com_acc
ount_secured-3Freturnurl-3D_Views_Secured_corp_v221_en_ans-5Faas_ans-5Faas.h
tml&d=DwIFAw&c=zeCCs5WLaN-HWPHrpXwbFoOqeS0G3NH2_2IQ_bzV13g&r=IOkMURQRtftopTC
LYWjABvdzlGedqVvAMvUyU2Gzs2I&m=g4dZA3aO5eH_v0TLs6Hj9nqVPb3LbRlmRt_wYpwKHwtLG
KNUci3LOUhrjx5oAoNM&s=e8TgGFifJxH4XX0_QkliL_d5bPd_bypI_kdDbqH7Mis&e=

My new question is how to read in a CSV of point forces, and map them to the
structural model.  I've given up on using the WB interface at this point
because it is giving me fits on my Linux cluster.  So I'm going to try using
APDL to do the file read/mapping/solve.

The point force CSV is from my CFD solution, but is on a different mesh than
my mechanical simulation.  So the forces need to be mapped to the
surfaces/nodes of the mechanical model.  These are forces at discrete
points, not a field, so the interpolation would need to conserve the total
force applied.

The CSV is a point cloud of information, with a force-vector/location pair.
No mesh information.
"Traction[i] (N)","Traction[j] (N)","Traction[k] (N)","X (mm)","Y (mm)","Z
(mm)"
0.0175519044288876,-0.133241618707105,0.36252376963303,8.48947164677622,-1.6
7156843232078,0.72804856562505
0.0174687670479826,-0.0665973630469475,0.379089332635947,8.58245092723447,-1
.72662388432779,0.713273877000037

Does anyone have suggestions on how to read this into MAPDL, then do the
mapping?  For the file read, I looked up *TREAD, but this data is not
ordered, it's just a point cloud.  I could massage the CSV data into a
better format if it would make it easier to read into MAPDL.

For the mapping, is this a *MOPER,,,MAP thing?  Would that map from my point
forces to forces on each node?  I am thinking a loop that does:
Loop over all force/location pairs
Find element surface that contains location with ???
Distribute force over nodes with ?shape functions?
Apply forces to nodes with f,<node #>,fx,<portion of force on node> End
loop

Thanks in advance,
Aaron

Aaron C. Caba, Ph.D.
Sr. Principal R&D Engineer II
BAE Systems, Inc. | Ordnance Systems, Inc.

E-mail: aaron.caba@baesystems.com | Mail:  4050 Peppers Ferry Road, Radford
VA 24143-0100 www.baesystems.com

-----Original Message-----
From: Caba, Aaron (US) via Xansys xansys-temp@list.xansys.org

I have a WB project I'm using in a fluid-structure interaction loop with an
external CFD code.  The external code is orchestrating the solve loops.  It
calls WB with:
"runwb2 -B -R SolveForDisplacement.wbjn"
to update the project and save some CSV files with displacements. This is
working great, except for the overhead of opening WB every time.  It takes
about 65 seconds for the whole process, where 5 seconds are ANSYS and the
other 60 are opening & closing WB.  When the solution requires ~60-80
iterations to converge, that's and extra hour of wall clock time.

Is there a way to connect to a running WB session and send it commands?

Another option would be to re-write the file-read/map/solve/save as APDL
commands and avoid the overhead, but I'm more interested in the GUI option
for now.

Aaron C. Caba, Ph.D.
Sr. Principal R&D Engineer II
BAE Systems, Inc. | Ordnance Systems, Inc.

Office: +1 540 639 7086  |  Mobile: +1 540 230 3906  |  E-mail:
aaron.caba@baesystems.com | Mail:  4050 Peppers Ferry Road, Radford VA
24143-0100 www.baesystems.com


Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an
email to xansys-temp-leave@list.xansys.org If you are receiving too many
emails from XANSYS please consider changing account settings to Digest mode
which will send a single email per day.

Please send administrative requests such as deletion from XANSYS to
xansys-mod@tynecomp.co.uk and not to the list


Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an
email to xansys-temp-leave@list.xansys.org If you are receiving too many
emails from XANSYS please consider changing account settings to Digest mode
which will send a single email per day.

Please send administrative requests such as deletion from XANSYS to
xansys-mod@tynecomp.co.uk and not to the list

Hi Aaron, The "external data" object in WB is the best way to map CFD results to a structural model. If you insist on doing it in MAPDL, the *MOPER command is the way to go. You need to create two arrays of data. For example: Struct array is x,y,z coordinates of the structural model nodes you want to map to. Cfd array is x,y,z,pressure from your CFD results. Mapped will be the resulting array with node number and mapped pressure. *moper, mapped(1,1), struct(1,1), map, cfd(1,4), cfd(1,1), 3,, 0 sffun, pres, mapped(1,1) sf, all, pres Joseph T Metrisin Structures Lead Florida Turbine Technologies, Inc 1701 Military Tr. Suite 110 | Jupiter, FL 33458 USA +1 (561) 427-6346 Office | +1 (772) 834-4156 Mobile Joe.Metrisin@kratosdefense.com Visit our website: https://kratosdefense.com Confidentiality Note: The information contained in this transmission and any attachments are proprietary and may be privileged, intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited.  If you received this communication in error, please delete the message and immediately notify the sender via the contact information listed above. -----Original Message----- From: Caba, Aaron (US) via Xansys <xansys-temp@list.xansys.org> Sent: Thursday, February 10, 2022 6:24 PM To: XANSYS Mailing List Home <xansys-temp@list.xansys.org> Cc: Caba, Aaron (US) <Aaron.Caba@baesystems.com> Subject: [External] - [Xansys] Re: [WB] Drive Workbench from external program CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Here's a follow-up and another question. Apparently you can drive MAPDL and WB from Matlab using the Ansys as a Service (AaaS) toolbox. Check out Ansys knowledge solutions 2057025, 2058573 on the Ansys Customer Portal. It looks pretty cool, if you are using Matlab. You can also drive MAPDL from Python. See help page (https://urldefense.proofpoint.com/v2/url?u=https-3A__ansyshelp.ansys.com&d= DwIFAw&c=zeCCs5WLaN-HWPHrpXwbFoOqeS0G3NH2_2IQ_bzV13g&r=IOkMURQRtftopTCLYWjAB vdzlGedqVvAMvUyU2Gzs2I&m=g4dZA3aO5eH_v0TLs6Hj9nqVPb3LbRlmRt_wYpwKHwtLGKNUci3 LOUhrjx5oAoNM&s=nlxaggg3sbDN_oyAeqCR7CbblBrkjNZXUQj0oZvVXF4&e= ): "Mechanical APDL > Mechanical APDL as a Server User's Guide" https://urldefense.proofpoint.com/v2/url?u=https-3A__ansyshelp.ansys.com_acc ount_secured-3Freturnurl-3D_Views_Secured_corp_v221_en_ans-5Faas_ans-5Faas.h tml&d=DwIFAw&c=zeCCs5WLaN-HWPHrpXwbFoOqeS0G3NH2_2IQ_bzV13g&r=IOkMURQRtftopTC LYWjABvdzlGedqVvAMvUyU2Gzs2I&m=g4dZA3aO5eH_v0TLs6Hj9nqVPb3LbRlmRt_wYpwKHwtLG KNUci3LOUhrjx5oAoNM&s=e8TgGFifJxH4XX0_QkliL_d5bPd_bypI_kdDbqH7Mis&e= My new question is how to read in a CSV of point forces, and map them to the structural model. I've given up on using the WB interface at this point because it is giving me fits on my Linux cluster. So I'm going to try using APDL to do the file read/mapping/solve. The point force CSV is from my CFD solution, but is on a different mesh than my mechanical simulation. So the forces need to be mapped to the surfaces/nodes of the mechanical model. These are forces at discrete points, not a field, so the interpolation would need to conserve the total force applied. The CSV is a point cloud of information, with a force-vector/location pair. No mesh information. "Traction[i] (N)","Traction[j] (N)","Traction[k] (N)","X (mm)","Y (mm)","Z (mm)" 0.0175519044288876,-0.133241618707105,0.36252376963303,8.48947164677622,-1.6 7156843232078,0.72804856562505 0.0174687670479826,-0.0665973630469475,0.379089332635947,8.58245092723447,-1 .72662388432779,0.713273877000037 Does anyone have suggestions on how to read this into MAPDL, then do the mapping? For the file read, I looked up *TREAD, but this data is not ordered, it's just a point cloud. I could massage the CSV data into a better format if it would make it easier to read into MAPDL. For the mapping, is this a *MOPER,,,MAP thing? Would that map from my point forces to forces on each node? I am thinking a loop that does: Loop over all force/location pairs Find element surface that contains location with ??? Distribute force over nodes with ?shape functions? Apply forces to nodes with f,<node #>,fx,<portion of force on node> End loop Thanks in advance, Aaron Aaron C. Caba, Ph.D. Sr. Principal R&D Engineer II BAE Systems, Inc. | Ordnance Systems, Inc. E-mail: aaron.caba@baesystems.com | Mail: 4050 Peppers Ferry Road, Radford VA 24143-0100 www.baesystems.com -----Original Message----- From: Caba, Aaron (US) via Xansys <xansys-temp@list.xansys.org> I have a WB project I'm using in a fluid-structure interaction loop with an external CFD code. The external code is orchestrating the solve loops. It calls WB with: "runwb2 -B -R SolveForDisplacement.wbjn" to update the project and save some CSV files with displacements. This is working great, except for the overhead of opening WB every time. It takes about 65 seconds for the whole process, where 5 seconds are ANSYS and the other 60 are opening & closing WB. When the solution requires ~60-80 iterations to converge, that's and extra hour of wall clock time. Is there a way to connect to a running WB session and send it commands? Another option would be to re-write the file-read/map/solve/save as APDL commands and avoid the overhead, but I'm more interested in the GUI option for now. Aaron C. Caba, Ph.D. Sr. Principal R&D Engineer II BAE Systems, Inc. | Ordnance Systems, Inc. Office: +1 540 639 7086 |  Mobile: +1 540 230 3906 |  E-mail: aaron.caba@baesystems.com | Mail: 4050 Peppers Ferry Road, Radford VA 24143-0100 www.baesystems.com _______________________________________________ Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an email to xansys-temp-leave@list.xansys.org If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day. Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list _______________________________________________ Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an email to xansys-temp-leave@list.xansys.org If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day. Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list
C
cameljoe@optonline.net
Fri, Feb 11, 2022 12:33 PM

Joe Metrisin, that is cool!~

Tom Caltabellotta
t.caltabellotta@caci.com
CACI
15 Vreeland Avenue, Florham Park, NJ

-----Original Message-----
From: Joe Metrisin Joe.Metrisin@kratosdefense.com
Sent: Friday, February 11, 2022 6:34 AM
To: XANSYS Mailing List Home xansys-temp@list.xansys.org
Cc: Caba, Aaron (US) Aaron.Caba@baesystems.com
Subject: [Xansys] Re: [External] - Re: [WB] Drive Workbench from external
program

Hi Aaron,

The "external data" object in WB is the best way to map CFD results to a
structural model.  If you insist on doing it in MAPDL, the *MOPER command is
the way to go.  You need to create two arrays of data.  For example:

Struct array is x,y,z coordinates of the structural model nodes you want to
map to.
Cfd array is x,y,z,pressure from your CFD results.
Mapped will be the resulting array with node number and mapped pressure.

*moper, mapped(1,1), struct(1,1), map, cfd(1,4), cfd(1,1), 3,, 0
sffun, pres, mapped(1,1)
sf, all, pres

Joseph T Metrisin
Structures Lead

Florida Turbine Technologies, Inc
1701 Military Tr. Suite 110 | Jupiter, FL 33458 USA
+1 (561) 427-6346 Office | +1 (772) 834-4156 Mobile
Joe.Metrisin@kratosdefense.com

Visit our website: https://kratosdefense.com

Confidentiality Note:
The information contained in this transmission and any attachments are
proprietary and may be privileged, intended only for the use of the
individual or entity named above. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly prohibited.  If
you received this communication in error, please delete the message and
immediately notify the sender via the contact information listed above.

-----Original Message-----
From: Caba, Aaron (US) via Xansys xansys-temp@list.xansys.org
Sent: Thursday, February 10, 2022 6:24 PM
To: XANSYS Mailing List Home xansys-temp@list.xansys.org
Cc: Caba, Aaron (US) Aaron.Caba@baesystems.com
Subject: [External] - [Xansys] Re: [WB] Drive Workbench from external
program

CAUTION: This email originated from outside of the organization. Do not
click links or open attachments unless you recognize the sender and know the
content is safe.

Here's a follow-up and another question.  Apparently you can drive MAPDL and
WB from Matlab using the Ansys as a Service (AaaS) toolbox.  Check out Ansys
knowledge solutions 2057025, 2058573 on the Ansys Customer Portal.  It looks
pretty cool, if you are using Matlab.  You can also drive MAPDL from Python.
See help page
(https://urldefense.proofpoint.com/v2/url?u=https-3A__ansyshelp.ansys.com&d=
DwIFAw&c=zeCCs5WLaN-HWPHrpXwbFoOqeS0G3NH2_2IQ_bzV13g&r=IOkMURQRtftopTCLYWjAB
vdzlGedqVvAMvUyU2Gzs2I&m=g4dZA3aO5eH_v0TLs6Hj9nqVPb3LbRlmRt_wYpwKHwtLGKNUci3
LOUhrjx5oAoNM&s=nlxaggg3sbDN_oyAeqCR7CbblBrkjNZXUQj0oZvVXF4&e= ):
"Mechanical APDL > Mechanical APDL as a Server User's Guide"
https://urldefense.proofpoint.com/v2/url?u=https-3A__ansyshelp.ansys.com_acc
ount_secured-3Freturnurl-3D_Views_Secured_corp_v221_en_ans-5Faas_ans-5Faas.h
tml&d=DwIFAw&c=zeCCs5WLaN-HWPHrpXwbFoOqeS0G3NH2_2IQ_bzV13g&r=IOkMURQRtftopTC
LYWjABvdzlGedqVvAMvUyU2Gzs2I&m=g4dZA3aO5eH_v0TLs6Hj9nqVPb3LbRlmRt_wYpwKHwtLG
KNUci3LOUhrjx5oAoNM&s=e8TgGFifJxH4XX0_QkliL_d5bPd_bypI_kdDbqH7Mis&e=

My new question is how to read in a CSV of point forces, and map them to the
structural model.  I've given up on using the WB interface at this point
because it is giving me fits on my Linux cluster.  So I'm going to try using
APDL to do the file read/mapping/solve.

The point force CSV is from my CFD solution, but is on a different mesh than
my mechanical simulation.  So the forces need to be mapped to the
surfaces/nodes of the mechanical model.  These are forces at discrete
points, not a field, so the interpolation would need to conserve the total
force applied.

The CSV is a point cloud of information, with a force-vector/location pair.
No mesh information.
"Traction[i] (N)","Traction[j] (N)","Traction[k] (N)","X (mm)","Y (mm)","Z
(mm)"
0.0175519044288876,-0.133241618707105,0.36252376963303,8.48947164677622,-1.6
7156843232078,0.72804856562505
0.0174687670479826,-0.0665973630469475,0.379089332635947,8.58245092723447,-1
.72662388432779,0.713273877000037

Does anyone have suggestions on how to read this into MAPDL, then do the
mapping?  For the file read, I looked up *TREAD, but this data is not
ordered, it's just a point cloud.  I could massage the CSV data into a
better format if it would make it easier to read into MAPDL.

For the mapping, is this a *MOPER,,,MAP thing?  Would that map from my point
forces to forces on each node?  I am thinking a loop that does:
Loop over all force/location pairs
Find element surface that contains location with ???
Distribute force over nodes with ?shape functions?
Apply forces to nodes with f,<node #>,fx,<portion of force on node> End
loop

Thanks in advance,
Aaron

Aaron C. Caba, Ph.D.
Sr. Principal R&D Engineer II
BAE Systems, Inc. | Ordnance Systems, Inc.

E-mail: aaron.caba@baesystems.com | Mail:  4050 Peppers Ferry Road, Radford
VA 24143-0100 www.baesystems.com

-----Original Message-----
From: Caba, Aaron (US) via Xansys xansys-temp@list.xansys.org

I have a WB project I'm using in a fluid-structure interaction loop with an
external CFD code.  The external code is orchestrating the solve loops.  It
calls WB with:
"runwb2 -B -R SolveForDisplacement.wbjn"
to update the project and save some CSV files with displacements. This is
working great, except for the overhead of opening WB every time.  It takes
about 65 seconds for the whole process, where 5 seconds are ANSYS and the
other 60 are opening & closing WB.  When the solution requires ~60-80
iterations to converge, that's and extra hour of wall clock time.

Is there a way to connect to a running WB session and send it commands?

Another option would be to re-write the file-read/map/solve/save as APDL
commands and avoid the overhead, but I'm more interested in the GUI option
for now.

Aaron C. Caba, Ph.D.
Sr. Principal R&D Engineer II
BAE Systems, Inc. | Ordnance Systems, Inc.

Office: +1 540 639 7086  |  Mobile: +1 540 230 3906  |  E-mail:
aaron.caba@baesystems.com | Mail:  4050 Peppers Ferry Road, Radford VA
24143-0100 www.baesystems.com


Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an
email to xansys-temp-leave@list.xansys.org If you are receiving too many
emails from XANSYS please consider changing account settings to Digest mode
which will send a single email per day.

Please send administrative requests such as deletion from XANSYS to
xansys-mod@tynecomp.co.uk and not to the list


Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an
email to xansys-temp-leave@list.xansys.org If you are receiving too many
emails from XANSYS please consider changing account settings to Digest mode
which will send a single email per day.

Please send administrative requests such as deletion from XANSYS to
xansys-mod@tynecomp.co.uk and not to the list

Joe Metrisin, that is cool!~ Tom Caltabellotta t.caltabellotta@caci.com CACI 15 Vreeland Avenue, Florham Park, NJ -----Original Message----- From: Joe Metrisin <Joe.Metrisin@kratosdefense.com> Sent: Friday, February 11, 2022 6:34 AM To: XANSYS Mailing List Home <xansys-temp@list.xansys.org> Cc: Caba, Aaron (US) <Aaron.Caba@baesystems.com> Subject: [Xansys] Re: [External] - Re: [WB] Drive Workbench from external program Hi Aaron, The "external data" object in WB is the best way to map CFD results to a structural model. If you insist on doing it in MAPDL, the *MOPER command is the way to go. You need to create two arrays of data. For example: Struct array is x,y,z coordinates of the structural model nodes you want to map to. Cfd array is x,y,z,pressure from your CFD results. Mapped will be the resulting array with node number and mapped pressure. *moper, mapped(1,1), struct(1,1), map, cfd(1,4), cfd(1,1), 3,, 0 sffun, pres, mapped(1,1) sf, all, pres Joseph T Metrisin Structures Lead Florida Turbine Technologies, Inc 1701 Military Tr. Suite 110 | Jupiter, FL 33458 USA +1 (561) 427-6346 Office | +1 (772) 834-4156 Mobile Joe.Metrisin@kratosdefense.com Visit our website: https://kratosdefense.com Confidentiality Note: The information contained in this transmission and any attachments are proprietary and may be privileged, intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited.  If you received this communication in error, please delete the message and immediately notify the sender via the contact information listed above. -----Original Message----- From: Caba, Aaron (US) via Xansys <xansys-temp@list.xansys.org> Sent: Thursday, February 10, 2022 6:24 PM To: XANSYS Mailing List Home <xansys-temp@list.xansys.org> Cc: Caba, Aaron (US) <Aaron.Caba@baesystems.com> Subject: [External] - [Xansys] Re: [WB] Drive Workbench from external program CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Here's a follow-up and another question. Apparently you can drive MAPDL and WB from Matlab using the Ansys as a Service (AaaS) toolbox. Check out Ansys knowledge solutions 2057025, 2058573 on the Ansys Customer Portal. It looks pretty cool, if you are using Matlab. You can also drive MAPDL from Python. See help page (https://urldefense.proofpoint.com/v2/url?u=https-3A__ansyshelp.ansys.com&d= DwIFAw&c=zeCCs5WLaN-HWPHrpXwbFoOqeS0G3NH2_2IQ_bzV13g&r=IOkMURQRtftopTCLYWjAB vdzlGedqVvAMvUyU2Gzs2I&m=g4dZA3aO5eH_v0TLs6Hj9nqVPb3LbRlmRt_wYpwKHwtLGKNUci3 LOUhrjx5oAoNM&s=nlxaggg3sbDN_oyAeqCR7CbblBrkjNZXUQj0oZvVXF4&e= ): "Mechanical APDL > Mechanical APDL as a Server User's Guide" https://urldefense.proofpoint.com/v2/url?u=https-3A__ansyshelp.ansys.com_acc ount_secured-3Freturnurl-3D_Views_Secured_corp_v221_en_ans-5Faas_ans-5Faas.h tml&d=DwIFAw&c=zeCCs5WLaN-HWPHrpXwbFoOqeS0G3NH2_2IQ_bzV13g&r=IOkMURQRtftopTC LYWjABvdzlGedqVvAMvUyU2Gzs2I&m=g4dZA3aO5eH_v0TLs6Hj9nqVPb3LbRlmRt_wYpwKHwtLG KNUci3LOUhrjx5oAoNM&s=e8TgGFifJxH4XX0_QkliL_d5bPd_bypI_kdDbqH7Mis&e= My new question is how to read in a CSV of point forces, and map them to the structural model. I've given up on using the WB interface at this point because it is giving me fits on my Linux cluster. So I'm going to try using APDL to do the file read/mapping/solve. The point force CSV is from my CFD solution, but is on a different mesh than my mechanical simulation. So the forces need to be mapped to the surfaces/nodes of the mechanical model. These are forces at discrete points, not a field, so the interpolation would need to conserve the total force applied. The CSV is a point cloud of information, with a force-vector/location pair. No mesh information. "Traction[i] (N)","Traction[j] (N)","Traction[k] (N)","X (mm)","Y (mm)","Z (mm)" 0.0175519044288876,-0.133241618707105,0.36252376963303,8.48947164677622,-1.6 7156843232078,0.72804856562505 0.0174687670479826,-0.0665973630469475,0.379089332635947,8.58245092723447,-1 .72662388432779,0.713273877000037 Does anyone have suggestions on how to read this into MAPDL, then do the mapping? For the file read, I looked up *TREAD, but this data is not ordered, it's just a point cloud. I could massage the CSV data into a better format if it would make it easier to read into MAPDL. For the mapping, is this a *MOPER,,,MAP thing? Would that map from my point forces to forces on each node? I am thinking a loop that does: Loop over all force/location pairs Find element surface that contains location with ??? Distribute force over nodes with ?shape functions? Apply forces to nodes with f,<node #>,fx,<portion of force on node> End loop Thanks in advance, Aaron Aaron C. Caba, Ph.D. Sr. Principal R&D Engineer II BAE Systems, Inc. | Ordnance Systems, Inc. E-mail: aaron.caba@baesystems.com | Mail: 4050 Peppers Ferry Road, Radford VA 24143-0100 www.baesystems.com -----Original Message----- From: Caba, Aaron (US) via Xansys <xansys-temp@list.xansys.org> I have a WB project I'm using in a fluid-structure interaction loop with an external CFD code. The external code is orchestrating the solve loops. It calls WB with: "runwb2 -B -R SolveForDisplacement.wbjn" to update the project and save some CSV files with displacements. This is working great, except for the overhead of opening WB every time. It takes about 65 seconds for the whole process, where 5 seconds are ANSYS and the other 60 are opening & closing WB. When the solution requires ~60-80 iterations to converge, that's and extra hour of wall clock time. Is there a way to connect to a running WB session and send it commands? Another option would be to re-write the file-read/map/solve/save as APDL commands and avoid the overhead, but I'm more interested in the GUI option for now. Aaron C. Caba, Ph.D. Sr. Principal R&D Engineer II BAE Systems, Inc. | Ordnance Systems, Inc. Office: +1 540 639 7086 |  Mobile: +1 540 230 3906 |  E-mail: aaron.caba@baesystems.com | Mail: 4050 Peppers Ferry Road, Radford VA 24143-0100 www.baesystems.com _______________________________________________ Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an email to xansys-temp-leave@list.xansys.org If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day. Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list _______________________________________________ Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an email to xansys-temp-leave@list.xansys.org If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day. Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list
MA
Mohammad A Gharaibeh
Fri, Feb 11, 2022 3:03 PM

Hello Aaron,

Here's something at the top of my mind that might help. Have you thought
about something similar to what we do in submodeling? You might want to
create a file that creates nodes on the specified locations with the
tractions and do the cut boundaries degrees of freedom (CBDOF)? I have not
done this since 2015 and ain't sure if it would work, but maybe worth
looking into it.

Good Luck!
Mohammad

---====
Mohammad A Gharaibeh, Ph.D.
Associate Professor
Department of Mechanical Engineering
The Hashemite University
P.O. Box 330127
Zarqa, 13133, Jordan
Tel: +962 - 5 - 390 3333 Ext. 4771
Fax: +962 - 5 - 382 6348

---====

Hello Aaron, Here's something at the top of my mind that might help. Have you thought about something similar to what we do in submodeling? You might want to create a file that creates nodes on the specified locations with the tractions and do the cut boundaries degrees of freedom (CBDOF)? I have not done this since 2015 and ain't sure if it would work, but maybe worth looking into it. Good Luck! Mohammad ===================================== Mohammad A Gharaibeh, Ph.D. Associate Professor Department of Mechanical Engineering The Hashemite University P.O. Box 330127 Zarqa, 13133, Jordan Tel: +962 - 5 - 390 3333 Ext. 4771 Fax: +962 - 5 - 382 6348 ===================================== >
CW
Christopher Wright
Fri, Feb 11, 2022 7:57 PM

On Feb 10, 2022, at 5:23 PM, Caba, Aaron (US) via Xansys xansys-temp@list.xansys.org wrote:

Does anyone have suggestions on how to read this into MAPDL, then do the mapping?

Not to rain on the parade but I've had some experience with this sort of neat-o time-saving thing. It's really a lot of fun but I found that unless I did exactly one particular thing all the time in exactly the same way and wasted a lot of time doing it, I never saved much effort although it's really cool having a few key strokes do something that once took an afternoon. From the get-go your approach depends on the effects of future changes, including bugs and fixes in ANSYS, so you're immediately depending on two separate pieces of software plus the overlap where before you only had one. And all three rest on your shoulders. ANSYS has squads of people looking after it making otherwise invisible change and fixes and still stuff gets through. That great feeling every time it all worked and saved me an afternoon's drudgery has a wicked stepsister—the sinking feeling whenever something comes out looking odd, and back you go looking at everything just to make certain.  But it's sure fun to do up until the time you have to drop everything—usually around quitting time—to show someone why it works for you and not for him/her and how to do the same thing only different. The up side of it all is that I always learned a lot and I think it made me sharper and quite often even saved some work

That said I loved to do cool tweaks like that no matter how much extra work it cost. I spent hours thinking how to make my Mac front-end ANSYS from my home office in the old days. Good luck.

C—

Christopher Wright P.E. (ret'd) |"They couldn't hit an elephant at
chrisw@skypoint.com | this distance" (last words of Gen.
| John Sedgwick, Spotsylvania (1864)
http://www.skypoint.com/members/chrisw/

On Feb 10, 2022, at 5:23 PM, Caba, Aaron (US) via Xansys <xansys-temp@list.xansys.org> wrote: > > Does anyone have suggestions on how to read this into MAPDL, then do the mapping? Not to rain on the parade but I've had some experience with this sort of neat-o time-saving thing. It's really a lot of fun but I found that unless I did exactly one particular thing all the time in exactly the same way and wasted a lot of time doing it, I never saved much effort although it's really cool having a few key strokes do something that once took an afternoon. From the get-go your approach depends on the effects of future changes, including bugs and fixes in ANSYS, so you're immediately depending on two separate pieces of software plus the overlap where before you only had one. And all three rest on your shoulders. ANSYS has squads of people looking after it making otherwise invisible change and fixes and still stuff gets through. That great feeling every time it all worked and saved me an afternoon's drudgery has a wicked stepsister—the sinking feeling whenever something comes out looking odd, and back you go looking at everything just to make certain. But it's sure fun to do up until the time you have to drop everything—usually around quitting time—to show someone why it works for you and not for him/her and how to do the same thing only different. The up side of it all is that I always learned a lot and I think it made me sharper and quite often even saved some work That said I loved to do cool tweaks like that no matter how much extra work it cost. I spent hours thinking how to make my Mac front-end ANSYS from my home office in the old days. Good luck. C— Christopher Wright P.E. (ret'd) |"They couldn't hit an elephant at chrisw@skypoint.com | this distance" (last words of Gen. | John Sedgwick, Spotsylvania (1864) http://www.skypoint.com/members/chrisw/
CA
Caba, Aaron (US)
Fri, Feb 11, 2022 10:20 PM

Chris,

I agree that this is basically a Rube Goldberg machine built on quicksand.

This 'neato time saving thing' is wrapped in a fluid structure interaction loop, exactly the definition of 'exactly one particular thing all the time in exactly the same way', hundreds or thousands of times.  Without this mapping piece the whole analysis just doesn't work, unless I plan to hand map the data every 3 minutes for the next 2 weeks.  Maybe it's time to hire an intern ...

Aaron C. Caba, Ph.D.
Sr. Principal R&D Engineer II
BAE Systems, Inc. | Ordnance Systems, Inc.

E-mail: aaron.caba@baesystems.com | Mail:  4050 Peppers Ferry Road, Radford VA 24143-0100
www.baesystems.com

-----Original Message-----
From: Christopher Wright chrisw@skypoint.com
Sent: Friday, February 11, 2022 2:58 PM
To: XANSYS Mailing List Home xansys-temp@list.xansys.org
Subject: [Xansys] Re: [WB] Drive Workbench from external program

External Email Alert

This email has been sent from an account outside of the BAE Systems network.
Please treat the email with caution, especially if you are requested to click on a link, decrypt/open an attachment, or enable macros.  For further information on how to spot phishing, access OSI IT Policies and report phishing by forwarding mail to phishing@baesystems.com.

On Feb 10, 2022, at 5:23 PM, Caba, Aaron (US) via Xansys xansys-temp@list.xansys.org wrote:

Does anyone have suggestions on how to read this into MAPDL, then do the mapping?

Not to rain on the parade but I've had some experience with this sort of neat-o time-saving thing. It's really a lot of fun but I found that unless I did exactly one particular thing all the time in exactly the same way and wasted a lot of time doing it, I never saved much effort although it's really cool having a few key strokes do something that once took an afternoon. From the get-go your approach depends on the effects of future changes, including bugs and fixes in ANSYS, so you're immediately depending on two separate pieces of software plus the overlap where before you only had one. And all three rest on your shoulders. ANSYS has squads of people looking after it making otherwise invisible change and fixes and still stuff gets through. That great feeling every time it all worked and saved me an afternoon's drudgery has a wicked stepsister—the sinking feeling whenever something comes out looking odd, and back you go looking at everything just to make certain.  But it's sure fun to do up until the time you have to drop everything—usually around quitting time—to show someone why it works for you and not for him/her and how to do the same thing only different. The up side of it all is that I always learned a lot and I think it made me sharper and quite often even saved some work

That said I loved to do cool tweaks like that no matter how much extra work it cost. I spent hours thinking how to make my Mac front-end ANSYS from my home office in the old days. Good luck.

C—

Christopher Wright P.E. (ret'd) |"They couldn't hit an elephant at
chrisw@skypoint.com            | this distance" (last words of Gen.
| John Sedgwick, Spotsylvania (1864) http://www.skypoint.com/members/chrisw/


Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an email to xansys-temp-leave@list.xansys.org If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day.

Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list

Chris, I agree that this is basically a Rube Goldberg machine built on quicksand. This 'neato time saving thing' is wrapped in a fluid structure interaction loop, exactly the definition of 'exactly one particular thing all the time in exactly the same way', hundreds or thousands of times. Without this mapping piece the whole analysis just doesn't work, unless I plan to hand map the data every 3 minutes for the next 2 weeks. Maybe it's time to hire an intern ... Aaron C. Caba, Ph.D. Sr. Principal R&D Engineer II BAE Systems, Inc. | Ordnance Systems, Inc. E-mail: aaron.caba@baesystems.com | Mail: 4050 Peppers Ferry Road, Radford VA 24143-0100 www.baesystems.com -----Original Message----- From: Christopher Wright <chrisw@skypoint.com> Sent: Friday, February 11, 2022 2:58 PM To: XANSYS Mailing List Home <xansys-temp@list.xansys.org> Subject: [Xansys] Re: [WB] Drive Workbench from external program External Email Alert This email has been sent from an account outside of the BAE Systems network. Please treat the email with caution, especially if you are requested to click on a link, decrypt/open an attachment, or enable macros. For further information on how to spot phishing, access OSI IT Policies and report phishing by forwarding mail to phishing@baesystems.com. On Feb 10, 2022, at 5:23 PM, Caba, Aaron (US) via Xansys <xansys-temp@list.xansys.org> wrote: > > Does anyone have suggestions on how to read this into MAPDL, then do the mapping? Not to rain on the parade but I've had some experience with this sort of neat-o time-saving thing. It's really a lot of fun but I found that unless I did exactly one particular thing all the time in exactly the same way and wasted a lot of time doing it, I never saved much effort although it's really cool having a few key strokes do something that once took an afternoon. From the get-go your approach depends on the effects of future changes, including bugs and fixes in ANSYS, so you're immediately depending on two separate pieces of software plus the overlap where before you only had one. And all three rest on your shoulders. ANSYS has squads of people looking after it making otherwise invisible change and fixes and still stuff gets through. That great feeling every time it all worked and saved me an afternoon's drudgery has a wicked stepsister—the sinking feeling whenever something comes out looking odd, and back you go looking at everything just to make certain. But it's sure fun to do up until the time you have to drop everything—usually around quitting time—to show someone why it works for you and not for him/her and how to do the same thing only different. The up side of it all is that I always learned a lot and I think it made me sharper and quite often even saved some work That said I loved to do cool tweaks like that no matter how much extra work it cost. I spent hours thinking how to make my Mac front-end ANSYS from my home office in the old days. Good luck. C— Christopher Wright P.E. (ret'd) |"They couldn't hit an elephant at chrisw@skypoint.com | this distance" (last words of Gen. | John Sedgwick, Spotsylvania (1864) http://www.skypoint.com/members/chrisw/ _______________________________________________ Xansys mailing list -- xansys-temp@list.xansys.org To unsubscribe send an email to xansys-temp-leave@list.xansys.org If you are receiving too many emails from XANSYS please consider changing account settings to Digest mode which will send a single email per day. Please send administrative requests such as deletion from XANSYS to xansys-mod@tynecomp.co.uk and not to the list