FEMAP API, exporting Abaqus .inp file issue

Creator
Creator

Hello,

 

I am using the FEMAP 11.4 api to automate the writing of an abaqus input file.

 

The code sets some options and then calls the feFileWriteAbaqus method.

 

The trouble is that the resulting .inp files do not contain the *element definitions.  All of the nodes are there, as well as the set definitions (from the femap groups).  What makes it more strange is that if I manually (in FEMAP) export the analysis model, then the file is written correctly.  Any insight on why the API function is not writing out the element definitions?   Thank you-

 

Code (c#):

analysisMgr = pModel.feAnalysisMgr;
rc = analysisMgr.InitAnalysisMgr(femap.zAnalysisMgrProgram.FAM_ABAQUS, femap.zAnalysisType.FAT_EXPLICIT, true);
rc = analysisMgr.Put(analysisMgr.NextEmptyID());
rc = analysisMgr.Get(analysisMgr.ID);
analysisMgr.title = fileNameWithoutExtension;
analysisMgr.LinkedSolverOption = femap.zLinkedSolver.FS_LINKED;
analysisMgr.AbaModOn = true;
analysisMgr.AbaModGroupsAsSets = true;
analysisMgr.AbaModTitleSetNames = true;
analysisMgr.AbaModSkipStandard = false;
analysisMgr.Active = analysisMgr.ID;
rc = analysisMgr.Put(analysisMgr.ID);
rc = analysisMgr.Get(analysisMgr.ID);

string outputFileName = fileInfo.DirectoryName + @"\" + fileNameWithoutExtension + ".modfem";
rc = pModel.feFileSaveAs(false, outputFileName);

string abaqusInputFileName=fileInfo.DirectoryName+@"\"+fileNameWithoutExtension+".inp";
rc = pModel.feFileWriteAbaqus(0, abaqusInputFileName);

8 REPLIES 8

Re: FEMAP API, exporting Abaqus .inp file issue

Siemens Phenom Siemens Phenom
Siemens Phenom

admiller,

 

Any chance you can share the model?  Or possibly reproduce the issue in a sample model?

Re: FEMAP API, exporting Abaqus .inp file issue

Siemens Phenom Siemens Phenom
Siemens Phenom

Do you have your Groups populate with Elements?

Best Regards,
Chip Fricke
Principal Applications Engineer - Femap Product Development

Re: FEMAP API, exporting Abaqus .inp file issue

Creator
Creator

Thanks for the quick response; here is a sample model. 

  • femap file, test_case.modfem
  • test_case.inp  (written from api, see above)
  • test_case_manual_export.inp  (written by clicking on the model->analysis->export user interface)

Let me know if anything else would be helpful, thanks

 

 

Re: FEMAP API, exporting Abaqus .inp file issue

Creator
Creator

I think so; check out the femap model that I have attached, and the 2 input files generated by the 2 different methods. 

Re: FEMAP API, exporting Abaqus .inp file issue

Siemens Valued Contributor Siemens Valued Contributor
Siemens Valued Contributor

admiller,

 

The problem here is that the default Analysis Type defined in File-Preferences-Interfaces is not set to 9...Explicit Transient Dynamics.

Set that preference and the full model will be exported.  Exporting to Abaqus via the GUI uses a different path which does not exhibit the same problem.

The documentation doesn’t indicate that the default Analysis Type needs to be set so I’ll investigate further and see if this was intended and update the code or documentation accordingly.

 

There is an additional issue in solid property #2 which is not currently referencing a material. If you run File-Rebuild Femap you will issue the following error.

 

Material 0 Does Not Exist. Referenced by Property 2.

Database Update Completed. Errors Found.

Errors have Occurred. Check Message Window.

 

You will need to correct this as well before the model will successfully export.

 

Dan

Re: FEMAP API, exporting Abaqus .inp file issue

Siemens Valued Contributor Siemens Valued Contributor
Siemens Valued Contributor

After further review the requirement that the default Analysis Type is set before calling this method is actually documented in the API  Reference Manual.

 

Remarks/Usage:
If you have an active analysis set, preferably one that has ABAQUS selected as the solver, then no dialog
boxes will be displayed. If not, this function will display dialog boxes to collect whatever data that it
needs to complete the file using the legacy analysis translator. The global variable Pref_AnalysisType is
used to determine the type of analysis that is to be performed by the file.

 

Dan

Re: FEMAP API, exporting Abaqus .inp file issue

Creator
Creator

I will try this and will be back to let you know how it goes.  Thanks much for looking into it!

 

 

Re: FEMAP API, exporting Abaqus .inp file issue

Creator
Creator
Worked great, accepted as a solution.

Thanks Dan