CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS Meshing & Geometry (https://www.cfd-online.com/Forums/ansys-meshing/)
-   -   [ANSYS Meshing] Error in Workbench "Unable to attach to geometry file" (https://www.cfd-online.com/Forums/ansys-meshing/106692-error-workbench-unable-attach-geometry-file.html)

JAISE15 March 18, 2014 00:11

Unable to attach to geometry file
 
I made a simple cube in design moduler and saved it.
when taking mesh it starts and goes away automatically
and then a x mark in mesh. error is "Unable to attach to geometry file"
I tried cad configuration and also even reinstalled ansys still the issue is there...

dcavalie May 12, 2015 16:25

Quote:

Originally Posted by Jeremie84 (Post 381679)
Hi,
I uninstalled then reinstalled ANSYS and now it works.
There are a few known issues when installing ANSYS on Windows 7. The problem seemed to be that ANSYS was installed in C:\Users\username instead of Program Files.

To avoid this problem, you have to turn off User Account Control and IPv6 before installing ANSYS.

Thanks again Ali for your help

Jérémie

I am having the same problem with a geometry I created in DM. Funny thing is, I was just running a very similar geometry in Fluent through ANSYS WorkBench and it meshed and solved just fine. I am running on Windows 7. I checked and ANSYS is installed in Program Files.

rbgamblin June 17, 2015 15:29

Same problem, different user
 
1 Attachment(s)
Quote:

Originally Posted by dcavalie (Post 546067)
I am having the same problem with a geometry I created in DM. Funny thing is, I was just running a very similar geometry in Fluent through ANSYS WorkBench and it meshed and solved just fine. I am running on Windows 7. I checked and ANSYS is installed in Program Files.

I am having this same issue as dcavalie mentioned above. Windows 7 OS, Ansys installed in the standard Program Files directory, with a geometry I created using Ansys DesignModeler. It gives me this issue if I close the "Model" and have to open it back up again (which is always, because I have to tweak stuff).

Attached is a photo of this.
I read somewhere that if your "SYS.mechdb" is showing a file size of 20kB (which mine is) then that means it's corrupted ( http://xansys.org/forum/viewtopic.php?p=91606 ), and found step by step how to reload it ( http://www.padtinc.com/blog/the-focu...ble-to-recover )... But I just tried that and I got the "Failed to load legacy database" error in the Ansys main window. Also I would rather PREVENT the corruption, especially when using built in DesignModeler!!

For the record: I am not getting corrupted databases after "hardclosing" Ansys. It is within the same Ansys session, from when I create the geometry in DesignModeler, open the mechanical Model to perform meshing and loads, then closing Model, and opening it again.

Kapi June 17, 2015 18:56

Hi rbgamblin,

Try to use a simple model and see if its working.
Did you change location from default when you where installing Ansys?
I think its not able to locate your model and thats why giving error.
Try re-installing?

Cheers
KAPI

USER1234 June 18, 2015 04:37

Quote:

Originally Posted by Kapi (Post 550839)
I think its not able to locate your model and thats why giving error.

Hi,

I've created my Geometry by scripting in DesignModeler. When I run the Script, DesignModeler opens and the geometry creates. When I close DesignModeler it shows the green hook after Geometry in my Workbench. So it should have created the Geometry correctly.
When I now want to open Mechanical it shows me the following Error:

Code:

CommandFailedException: Geometry must be attached before branches can be created.
In file "Z:\Diplomarbeit_HTW\MATLAB\einfache_Zahngeometrie\Running_Script.wbjn", line 2944

Do I have to export the DesignModeler Geometry as .iges or something like this first?

Edit: I just found this Code in the "DSGeometryScript.js:
Code:

var pmdlg;

var kUpdateFromCAD                              = 0;
var kUpdateAllCADParameters            = 1;
var kUpdateChangedCADParameters = 2;

var bIgnoreToolbarUpdate = false;
var errorAttachCallback;
var warningAttachCallback;

/* START OF ATTACH METHODS */
// this funtion is sitting here just because other funtions here using it, already moved to C++: Jay 06/03/07
function progressAttachPane (filename, caption)
{
    pmdlg = CreateActiveXObject (str_WBHTMLDialogProgId);
    var xf = CreateActiveXObject(str_DlgArgsProgId);
    xf ("wb") = wb;
    xf ("dlg") = pmdlg;
    xf ("WBScript") = WBScript;
      var coordinates= wb.GetNthFileName(str_SaveProgressWndCoord, "DSApplet");
    pmdlg.InitialWindowPosition = coordinates;
    pmdlg.DoDialog (wb.hWnd, filename, xf, true, 400, 150, 0, caption, true);
    pmdlg.SolutionDlg = true;
}

function SpecificAttach (PIName, fName, existingBranch)
{

    try
    {
        if(typeof(existingBranch) == "undefined")
        {
            g_UIHandler.GeometryHandler.SpecificAttach0(PIName, fName);
            RefreshMeshingOptionsPane();
        }
        else
            g_UIHandler.GeometryHandler.SpecificAttach(PIName, fName, existingBranch);
    }
    catch(e)
    {
        return e.number;
    }
    return 0;
}

function doPlugInEasyAttach()
{
    SpecificAttach("", "");
}

function FileEasyAttach(fName)
{
    SpecificAttach(fName, "");
}

function doAttachAssembly()
{
    WBScript.Out (localString("ID_DoAttachAssemblyMessage"), true );
}
/* END OF ATTACH METHODS */

.. but I actuall don't know how to use it .. I think it should work with only this function:

Code:

function FileEasyAttach(fName)
{
    SpecificAttach(fName, "");
}

but maybe this is jut too easy ;)


Best regards
Max

piyusharas June 18, 2015 05:28

I also faced same problems. But ansys workbench accepts format iges only..
so just save ur model in iges format and then import it will definetely work.

USER1234 June 19, 2015 04:17

Quote:

Originally Posted by piyusharas (Post 550894)
I also faced same problems. But ansys workbench accepts format iges only..
so just save ur model in iges format and then import it will definetely work.

Hi, thanks for reply. This didn't solve the problem either.

Best regards
Max

Kapi June 23, 2015 19:28

Hi Guys,

I suggest re-installing and checking if it is working!
If it is still not working, I reckon you should contact Customer support cuz it could be a bug.


Cheers
KAPI

USER1234 June 26, 2015 04:07

ok, I figured out that the problem isn't the Mechanical .. I've entered a new Material (Engineering Data) by scripting.
When I use a given material (Engineering Data) everything works fine .. so I have to find the failure in my Engineering Data - script. There has to be a mistake or something missing ..

Kapi June 28, 2015 18:51

Hi Max,

Share your script so that we can figure out the issue.


Cheers
KAPI

Manan patel June 28, 2015 23:40

Any one else have module for learning ansys ,I want it bcoz I m student of master of science and wan a use it in my proj.so

USER1234 June 30, 2015 06:21

Quote:

Originally Posted by Kapi (Post 552474)
Share your script so that we can figure out the issue.

This is my whole script for delete the "Structural Steel" and create a new material "31CrMoV9".

data is in some cases just an example value.

Code:

EngineeringData1 = system1.GetContainer(ComponentName="Engineering Data")

StrucSteel = EngineeringData1.GetMaterial(Name="Structural Steel")
StrucSteel.Delete()
NewMaterial_31CrMoV9 = EngineeringData1.CreateMaterial(Name="31CrMoV9")

DensProperty = NewMaterial_31CrMoV9.CreateProperty(Name="Density")
DensProperty = NewMaterial_31CrMoV9.GetProperty(Name="Density")
newData1 = {"Temperature": ["20 [C]"],"Density": ["7730 [kg m^-3]"]}
DensProperty.SetData(SheetName="Density", Data = newData1)

ThermExpProperty = NewMaterial_31CrMoV9.CreateProperty(Name="Coefficient of Thermal Expansion",Definition="Secant",Behavior="Isotropic")
ThermExpProperty = NewMaterial_31CrMoV9.GetProperty(Name="Coefficient of Thermal Expansion")
ThermExpProperty.SetData(SheetName="Coefficient of Thermal Expansion",SheetQualifiers={"Definition": "Secant", "Behavior": "Isotropic"},
Index=-1,Variables=["Coefficient of Thermal Expansion"],Values=[["1.2E-05 [C^-1]"]])
ThermExpProperty.SetData(SheetName="Reference Temperature",SheetQualifiers={"Definition": "Secant", "Behavior": "Isotropic"},
Index=-1,Variables=["Reference Temperature"],Values=[["20 [C]"]])

ElastProperty = NewMaterial_31CrMoV9.CreateProperty(Name="Elasticity",Behavior="Isotropic")
ElastProperty.SetData(Variables="Young's Modulus",Values="2.1e5 [MPa]")
ElastProperty.SetData(Variables="Poisson's Ratio",Values="0.3")

AlternStressMeanStress = NewMaterial_31CrMoV9.CreateProperty(Name="Alternating Stress",Definition="Mean Stress")
AlternStressMeanStress = NewMaterial_31CrMoV9.GetProperty(Name="Alternating Stress")
AlternStressMeanStress.SetQualifier(Qualifier="Interpolation",Value="Log-Log")
AlternStressMeanStress.BeginBatchUpdate()
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=-1,Variables=["Mean Stress"],Values=[["0 [Pa]"]])
AlternStressMeanStress.EndBatchUpdate()
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Variables=["Cycles"],Values=[["10"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Variables=["Alternating Stress"],Values=[["3999000000 [Pa]"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=-1,Variables=["Mean Stress", "Cycles"],Values=[["0 [Pa]"], ["20"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=1,Variables=["Alternating Stress"],Values=[["2827000000 [Pa]"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=-1,Variables=["Mean Stress", "Cycles"],Values=[["0 [Pa]"], ["50"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=2,Variables=["Alternating Stress"],Values=[["1896000000 [Pa]"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=-1,Variables=["Mean Stress", "Cycles"],Values=[["0 [Pa]"], ["100"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=3,Variables=["Alternating Stress"],Values=[["1413000000 [Pa]"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=-1,Variables=["Mean Stress", "Cycles"],Values=[["0 [Pa]"], ["200"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=4,Variables=["Alternating Stress"],Values=[["1069000000 [Pa]"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=-1,Variables=["Mean Stress", "Cycles"],Values=[["0 [Pa]"], ["2000"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=5,Variables=["Alternating Stress"],Values=[["441000000 [Pa]"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=-1,Variables=["Mean Stress", "Cycles"],Values=[["0 [Pa]"], ["10000"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=6,Variables=["Alternating Stress"],Values=[["262000000 [Pa]"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=-1,Variables=["Mean Stress", "Cycles"],Values=[["0 [Pa]"], ["20000"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=7,Variables=["Alternating Stress"],Values=[["214000000 [Pa]"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=-1,Variables=["Mean Stress", "Cycles"],Values=[["0 [Pa]"], ["100000"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=8,Variables=["Alternating Stress"],Values=[["138000000 [Pa]"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=-1,Variables=["Mean Stress", "Cycles"],Values=[["0 [Pa]"], ["200000"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=9,Variables=["Alternating Stress"],Values=[["114000000 [Pa]"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=-1,Variables=["Mean Stress", "Cycles"],Values=[["0 [Pa]"], ["1000000"]])
AlternStressMeanStress.SetData(SheetName="Alternating Stress",SheetQualifiers={"Definition": "Mean Stress", "Interpolation": "Log-Log"},
Index=10,Variables=["Alternating Stress"],Values=[["86200000 [Pa]"]])

StrainLifeParam = NewMaterial_31CrMoV9.CreateProperty(Name="Strain-Life Parameters")
StrainLifeParam.SetData(Index=-1,Variables=["Strength Coefficient"],Values=[["920000000 [Pa]"]])
StrainLifeParam.SetData(Variables=["Strength Exponent"],Values=[["-0.106"]])
StrainLifeParam.SetData(Variables=["Ductility Coefficient"],Values=[["0.213"]])
StrainLifeParam.SetData(Variables=["Ductility Exponent"],Values=[["-0.47"]])
StrainLifeParam.SetData(Variables=["Cyclic Strength Coefficient"],Values=[["1000000000 [Pa]"]])
StrainLifeParam.SetData(Variables=["Cyclic Strain Hardening Exponent"],Values=[["0.2"]])
TensYieldStrProperty = NewMaterial_31CrMoV9.CreateProperty(Name="Tensile Yield Strength")
TensYieldStrProperty.SetData(Variables="Tensile Yield Strength",Values="650 [MPa]")

CompYieldStrProperty = NewMaterial_31CrMoV9.CreateProperty(Name="Compressive Yield Strength")
CompYieldStrProperty.SetData(Variables="Compressive Yield Strength",Values="650 [MPa]")

TensUltStrProperty = NewMaterial_31CrMoV9.CreateProperty(Name="Tensile Ultimate Strength")
TensUltStrProperty.SetData(Variables="Tensile Ultimate Strength",Values="850 [MPa]")

CompUltStrProperty = NewMaterial_31CrMoV9.CreateProperty(Name="Compressive Ultimate Strength")
CompUltStrProperty.SetData(Variables="Compressive Ultimate Strength",Values="0 [MPa]")

I coulnd't find a mistake in my code .. I think there is some additional information missing!?

Best regards,
Max

Manan patel June 30, 2015 06:34

I want to analysis of wind turbine by CFD if u have any program for understand it then pls send me on :Mananpatel1991@yahoo.com

USER1234 July 7, 2015 08:38

Quote:

Originally Posted by Kapi (Post 552474)
Hi Max,

Share your script so that we can figure out the issue.


Cheers
KAPI

Hi KAPI,

... can you find any missing information or invalid input data or something else? (my Code is two entries above)

Best regards,
Max

Kapi July 7, 2015 19:01

Hi Max,

Add below code with your previous code and see if it works!

Code:

# encoding: utf-8
SetScriptVersion(Version="15.0")
template1 = GetTemplate(TemplateName="Engineering Data")
system1 = template1.CreateSystem()
EngineeringData1 = system1.GetContainer(ComponentName="Engineering Data")
EngineeringData1.Edit()
StrucSteel = EngineeringData1.GetMaterial(Name="Structural Steel")
StrucSteel.Delete()
NewMaterial_31CrMoV9 = EngineeringData1.CreateMaterial(Name="31CrMoV9")
....
...
...


Cheers
KAPI

Manan patel July 7, 2015 22:49

Kapi have you any code which can help me to make a thermal analysis of engine fins or heat exchanger or any elements ,for master thesis

Kapi July 8, 2015 00:26

Hi Manan,

Can I suggest you to start another thread with your question.
Posting random question in random thread is not very useful.
Start a new thread and ask your question giving all the details you have so everyone can help you in your thesis!

Cheers
KAPI

USER1234 July 9, 2015 05:42

1 Attachment(s)
Quote:

Originally Posted by Kapi (Post 554233)
Hi Max,

Add below code with your previous code and see if it works!

This doesn't work either.

I now tried this:

1. open ANSYS Workbench > static structural > engineering data > library > new material

2. enter properties and save it (D:/Temp/31CrMoV9

3. close ANSYS and open again

4. ANSYS Workbench > static structural > engineering data > library > bottom "..." = add an existing data source from file" > chose this file which was generated seconds before

5. Error (I've added a screenshot below)

Do you have a suggestion?


Best regards
Max

USER1234 July 9, 2015 09:26

ok, I figured that problem out .. this one is working now .. but after several testing I realized, that I get a blue question mark infront of the Geometry in ANSYS Mechanical (from Workbench) even if I change the material to a listed material like Copper Alloy. I can change material manually (following several different tutorials) and get the same problem. Does anybody had a problem like this before or do I have to save the changed material again in some different way?

Kapi July 9, 2015 21:21

Hi Max,

One of the reason for the blue question mark could be that you have not defined the full property of material.
To choose new Material from the data bank use this code.
Code:

#Material Selection
#Accesing the Engineering data and modifying the Material
engineeringData1 = system1.GetContainer(ComponentName="Engineering Data")
matl1 = engineeringData1.GetMaterial(Name="Structural Steel")
matl1.Delete()
favorites1 = EngData.LoadFavoriteItems()
library2 = EngData.OpenLibrary(
Name="General Materials",
Source="General_Materials.xml")
matl2 = engineeringData1.ImportMaterial(
Name="Aluminum Alloy",
Source="General_Materials.xml")
#End of Material Selection

see if you are getting same problem if you change your material!

Cheers
KAPI


All times are GMT -4. The time now is 19:27.