CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS (https://www.cfd-online.com/Forums/ansys/)
-   -   Transferring .gtm to CFX-PRE (https://www.cfd-online.com/Forums/ansys/138427-transferring-gtm-cfx-pre.html)

luv2hiphop July 3, 2014 18:46

Transferring .gtm to CFX-PRE
 
(ANSYS 15.0) I created an external connection system. What it does is importing design variables from an input file and creating curve files for Turbogrid (on background by Python script) and run it to create corresponding gtm meshfile and export to the target folder.
Finally, it is supposed to hand it over to CFX-PRE for analysis.

I currently created all connection between the modules on WB and succeeded in updating the external connection module. And here is where an issue pops up.

whenever I run the CFX-PRE for setup, it shows me the following message (input type: CFXMesh):
for giving the input property as PreFileType:
-Cannot load unknown PreFileType CFXMesh
System.ApplicationException: Cannot load unknown PreFileType CFXMesh
at Ansys.CFX.CFXCore.Data.CFXSetupSource.UpdatePreMes hes(IFullContext context)
at Ansys.CFX.CFXCore.Data.CFXSetupSource.LoadEditorDa ta(IFullContext context, Boolean interactive, Boolean dedicated)
at Ansys.CFX.Foundation.Data.CUESourceDataObject.Edit (IFullContext context, Boolean interactive)
at Ansys.CFX.CFXCore.Commands.EditSetupCommand.Execut e(IFullContext context)
at Ansys.Core.Commands.Concurrency.CommandWorkUnit.ex ecuteInContext(CommandContext subContext, IExecutionEngineCallback tracer)
at Ansys.Core.Commands.Concurrency.BaseWorkUnit.doExe cute(IExecutionEngineCallback executionEngine, CommandContext subContext)
at Ansys.Core.Commands.Concurrency.BaseWorkUnit.Execu te(IExecutionEngineCallback executionEngine, Boolean dontCatchExceptions)
--- Ansys.Core.Commands.CommandFailedException: Cannot load unknown PreFileType CFXMesh
CommandName: CFX.EditSetup(Container="Setup")
at Ansys.Core.Commands.CommandAsyncResult.Wait(Int32 milliSecondsTimeout, Boolean exitContext)
at Ansys.CFX.CFXCore.Commands.EditSetupGui.Invoke(Gui OperationContext context)
at Ansys.UI.GuiOperationContext.Invoke(GuiOperationMe taData operationData)
at Ansys.UI.UIManager.InvokeOperationCore(String pseudoname, OperationDelegate callback, Boolean allowOSMessages, Boolean coreTransaction)

for giving the input property as FileName:
Cannot load unknown PreFileType:
System.ApplicationException: Cannot load unknown PreFileType
at Ansys.CFX.CFXCore.Data.CFXSetupSource.UpdatePreMes hes(IFullContext context)
at Ansys.CFX.CFXCore.Data.CFXSetupSource.LoadEditorDa ta(IFullContext context, Boolean interactive, Boolean dedicated)
at Ansys.CFX.Foundation.Data.CUESourceDataObject.Edit (IFullContext context, Boolean interactive)
at Ansys.CFX.CFXCore.Commands.EditSetupCommand.Execut e(IFullContext context)
at Ansys.Core.Commands.Concurrency.CommandWorkUnit.ex ecuteInContext(CommandContext subContext, IExecutionEngineCallback tracer)
at Ansys.Core.Commands.Concurrency.BaseWorkUnit.doExe cute(IExecutionEngineCallback executionEngine, CommandContext subContext)
at Ansys.Core.Commands.Concurrency.BaseWorkUnit.Execu te(IExecutionEngineCallback executionEngine, Boolean dontCatchExceptions)
--- Ansys.Core.Commands.CommandFailedException: Cannot load unknown PreFileType
CommandName: CFX.EditSetup(Container="Setup")
at Ansys.Core.Commands.CommandAsyncResult.Wait(Int32 milliSecondsTimeout, Boolean exitContext)
at Ansys.CFX.CFXCore.Commands.EditSetupGui.Invoke(Gui OperationContext context)
at Ansys.UI.GuiOperationContext.Invoke(GuiOperationMe taData operationData)
at Ansys.UI.UIManager.InvokeOperationCore(String pseudoname, OperationDelegate callback, Boolean allowOSMessages, Boolean coreTransaction)



The manual for external connection add-in from ANSYS is quite bad. It doesn't give detail information and is nothing more than something that just brief explanation with elementary basic examples........

In order to set the output type to make it fit the input type of CFX-PRE, I have two properties. (CFX-PRE only accepts CFXMesh input type.)
"PreFileType" and "FileName". In the Python code, I am supposed to put some value for them like:
CFXMesh_Input_Object.PreFileType=~~~~
CFXMesh_Input_Object.FileName=~~~~

However, even if I follow the manual and the visual connection between is made on WB schematics, CFX-PRE denies to accept the .gtm mesh file from the upstream........

I came up with all possible ways and ideas but currently I'm getting stuck for 3 days. Changed whole structure, re coded all stuff, created different modules, engaged another program, and tried hundreds of times to put different value into ~~~~ but nothing has satisfied me.

I looked at the temp folder and definitely confirmed that when we are doing from TG-CFX then the CFX-PRE is absolutely imports the .gtm mesh file from the upstream TG.... Why is it not possible if between external connection module and CFX-PRE???????? CFX-PRE even says to me that you are trying to give me a 'unknown' file type...............

Is there anyone who can assist me? ... I have no idea what I should right now. My manager contacted ANSYS but seems like even the engineers in ANSYS have to take some time to solve this issue....

Posting a thread and needing help here might be my final effort. I'm pretty much desperate. Please.... I hope someone can help me..

If anyone can help me or give any intuition, experiences or information, I'll never forget. I'll really appreciate.

Thank you for everything.




The output setting code in Python is here:
# Obtain input data (created mesh file 'test-mesh_#.gtm')
container=ExternalConnectionSystemContainer
meshFilePath=r'C:/Program Files/ANSYS Inc/v150/Addins/ExternalConnection/SystemDefinitions/RC_Optimizer_CFX/test-mesh.gtm'
meshFileRef=RegisterFile(FilePath=meshFilePath)
AssociateFileWithContainer(meshFileRef, container)

outputRefs=container.GetOutputData()
meshOutputSet=outputRefs['CFXMesh']
meshOutput=meshOutputSet[0]

#meshOutput.PreFileType='CFXMesh'
meshOutput.FileName=meshFileRef


All times are GMT -4. The time now is 14:43.