Re: [WB] Drive Workbench from external program

P
ptroxler@borgwarner.com
Fri, Feb 11, 2022 12:49 PM

Hello Aeron,

Another way to map data in APDL is with the mapping processor. Here is a set of example commands:

/map ! Enter the /MAP module (writes out a BeforeMapping.db)
target, PressureMapSurfs ! Use named selection pressure_faces as target nodes
ftype,csv,0 ! type of pressure file to be mapped (csv file ) - real component only
read,FileOfData2Map.csv,1,,2,3,4,5, ! read pressure data file
plgeom ! Plot geometry - I think this yields a point cloud of the mapping points
map,,2,,1, ! Map 2D surface data - linear interpolation
plmap,target,,,0 ! Plot mapped target pressure - real part
writemap,MappedData.dat ! Write mapped pressure in SFE command format

Please note the map processor alters your databse. So once you are finished mapping you need to resume from BeforeMapping.db.

Kind Regards,
 
Paul Troxler
Senior Staff Engineer
 
BorgWarner Turbo Systems
1849 Brevard Road
Arden, NC 28704
Tel: 828-650-7448
 
ptroxler@borgwarner.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


Hello Aeron, Another way to map data in APDL is with the mapping processor. Here is a set of example commands: /map ! Enter the /MAP module (writes out a BeforeMapping.db) target, PressureMapSurfs ! Use named selection pressure_faces as target nodes ftype,csv,0 ! type of pressure file to be mapped (csv file ) - real component only read,FileOfData2Map.csv,1,,2,3,4,5, ! read pressure data file plgeom ! Plot geometry - I think this yields a point cloud of the mapping points map,,2,,1, ! Map 2D surface data - linear interpolation plmap,target,,,0 ! Plot mapped target pressure - real part writemap,MappedData.dat ! Write mapped pressure in SFE command format Please note the map processor alters your databse. So once you are finished mapping you need to resume from BeforeMapping.db. Kind Regards,   Paul Troxler Senior Staff Engineer   BorgWarner Turbo Systems 1849 Brevard Road Arden, NC 28704 Tel: 828-650-7448   ptroxler@borgwarner.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 >> _______________________________________________