I would like to run multiple Nastran analyses within Femap by calling directly the executable (nastran.exe) and all the different BDF files I have, in a sort of batch mode, without going through the Femap analysis manager.
Are there API instructions that would allow me to do this?
Use the function feFileExecute. For example;
The HTML Clipboard
Sub Main Dim App As femap.model Set App = feFemap() Dim rc As femap.zReturnCode Dim NastranExecutable As String NastranExecutable = "C:\Femap\nastran\bin\nastran.exe" Dim NastranDeck As String Dim NastranCommand As String NastranCommand = NastranExecutable + " " + NastranDeck rc = App.feFileExecute ( NastranCommand, False ) End Sub
This should work just fine unless the BDF files are not created in Femap (tagged by Femap for NX Nastran).
If this is the case I could assist, if still needed. That is just ask, if nobody else helps first.
That is indeed the case. I am generating multiple BDFs externally since Femap does not support all the Nastran cards that I need (I am doing aeroelastic analyses).
So the API code above will not work in this case? Is there a workaround?
Thanks for the reply CAIx.
The issue with opening and resaving the BDF with Femap is that, when I do this, Femap discards some Nastran cards that I need for my aeroelastic analyses (SOL144 and 146 in Nastran), that is the main reason why I want to modify the BDFs externally with a text editor and add these cards. Or this will not be the case with the API that you mean?
Thanks for your help offer. Luckily I am Windows based. Anyway I do not need to do this right now, but, if you are still available, I may get back in touch with you to ask for assistance in a couple of weeks.
For any cards that FEMAP does not support there are several ways that you can store them in your FEMAP model. You can enter them into the Model Notes. Simply go to File->Notes, choose "Translation Text", make sure "Include During Write Translation" is turned on, and enter them there. In this case they will be included with every Analysis Set. Or, if you want something more specific to a particular analysis, you can create the Analysis Set, then go to the Bulk Data Section and enter them as "Start Text". In either case, whatever cards you create will appear in the Bulk Data section when FEMAP exports the Nastran file.
I didn't see this coming. No, my combination of batch and startup API will only help for large number of analyses for which you already have BDFs. It would be of no help for the case of lost cards.
For what you need it looks like what grudy provided below is the best advice for a small number of analyses. In am not an expert in NASTRAN, sections and cards and includes, but it looks like his solution is fully supported by API and could be easily combined with a batch/API based approach for analyses in bulk like the one I described last night. If you will still need the bulk processing I will gladly help you on that side.