Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nastran substracting #10

Open
kris222 opened this issue Jan 17, 2018 · 13 comments
Open

Nastran substracting #10

kris222 opened this issue Jan 17, 2018 · 13 comments

Comments

@kris222
Copy link

kris222 commented Jan 17, 2018

Hi, I am trying to understand substracting in Nastran.
I am studying verification example 2-2 (Windmill panel sections for Automated Multi-stage Substructuring....).
When I run "run1"(folder D02-02-1A) I am getting output, as in verification folder, but when I do run 2, (folder D02-02-2A), I am getting error in out file. I do not understand how can I use input files with separate runs , which are in separate folders. Every time it looks that sof file is created in different folder, so how next run knows that result data are stored in sof in other folder? I cannot see in inp files any reference to other folders. What binds all separate runs results together?
I stacked at this step, and cannot find answer in manuals.
Kris

@AeroDME
Copy link

AeroDME commented Jan 17, 2018

NASTRAN is expecting the SOF1 environment to be pointing to the d02021a.sof1 file that was generated by your D02-02-1A run.

@kris222
Copy link
Author

kris222 commented Jan 18, 2018

Hi AeroDME.
I cannot see any reference in d02022a.inp to folder or files in D02-02-1A folder. How D02-02-2A run knows that needs to refer to d02021a.sof1?
In runs other than d02021a I am getting error:
, ERROR ENCOUNTERED IN DSREAD, UNIT= 90 RECORD= 1 STATUS= 5002
But if I change the line in second run : (add ",NEW")
SOF(1) = FT18,950 $ DEC VAX
to
SOF(1) = FT18,950,NEW $ DEC VAX

then I have no errors, however only SOF for second step is generated ( does not include first run data, I am assuming)

@AeroDME
Copy link

AeroDME commented Jan 18, 2018

Do you know if your SOF1 environment variable is being set?

@kris222
Copy link
Author

kris222 commented Jan 18, 2018 via email

@AeroDME
Copy link

AeroDME commented Jan 18, 2018

So, there is a nastran csh script. I did not use it. I made a python script for kicking off the nastran executable.

it is in the sbin directory of my fork:

https://github.com/AeroDME/NASTRAN-95/

this script will take the argument --SOF1

also --help will give a discription of the options in the script.

@kris222
Copy link
Author

kris222 commented Jan 18, 2018

Thanks Dan,
I am using Nastran compiled for Windows, but at least I know that running Nastran inp files is not the only thing I have to do.
I will try to figure how to set up SOF environment based on your files
Regards,
Kris

@AeroDME
Copy link

AeroDME commented Jan 18, 2018

Gotcha.

The problem I had is that the error messages do not tell you what the actual problem is. I just brute force set all the variables that are read by nastrn.f using that python script I pointed you to earlier.

Someday when time allows, I would like to start migrating some of that code to FORTRAN 90.

There are some other forks, too. More since last I looked. I am sure someone smarter than I is doing something cool with it! LOL

Have fun.

@maniin
Copy link

maniin commented Jan 31, 2018

Hi Dan,

SOF1 and SOF2..what is the difference. In this example case Example2 needs Example1's SOF file. How this is setting in linux, so that I can also try it in windows.

Thanks
Manikandan N

@AeroDME
Copy link

AeroDME commented Jan 31, 2018

Hi Manikandan,

SOF1 and SOF2 are simply variables holding substructure file names. I do not know if you HAVE to use SOF1 first, then SOF2 for the second. I do know that the source (nastrn.f) checks for SOF1 thru SOF10. So, I would assume you can have up to 10 substructrue files. Again, I do not know if they have to be used in order or anything. I would assume it depends on how you reference them in your master bulk data file (model input file).

On the Linux build, my startup script sets environment variables named "SOF1, SOF2, ... " Those variables must hold the filename of the sof1 file including the path relative to where the nastrn.exe has started execution.

on DOS:

SET SOF1=.\outputdir\d02021a.sof1

Note that you must check the path for wherever it is on your system.

Here is a job script that is generated by the nastran.py script I pointed you to earlier. It is a bash script, so it won't work on windows, but it will give you and idea of what environment variables to set. Each "export" statement is setting an environment variable. I am not entirely sure that all variables are required for each run. When I was originally trying to get this to work, I got tired of trying each one, so I just brute force set everyone that the main program was looking for.

##############################################
#!/bin/bash
#PBS -q nas
#PBS -N d02023a
#PBS -k n
export DIRCTY=/tmp/a956984d
export RFDIR=/home/dan/nastran/rf
export NPTPNM=OUTPUT/d02023a.nptp
export PLTNM=OUTPUT/d02023a.plt
export DICTNM=OUTPUT/d02023a.dict
export PUNCHNM=OUTPUT/d02023a.pch
export OPTPNM=OUTPUT/d02023a.opt
export LOGNM=OUTPUT/d02023a.f04
export IN12=OUTPUT/d02023a.in12
export OUT11=OUTPUT/d02023a.out11
export FTN11=OUTPUT/d02023a.f11
export FTN12=OUTPUT/d02023a.f12
export FTN13=OUTPUT/d02023a.f13
export FTN14=OUTPUT/d02023a.f14
export FTN15=OUTPUT/d02023a.f15
export FTN16=OUTPUT/d02023a.f16
export FTN17=OUTPUT/d02023a.f17
export FTN18=OUTPUT/d02023a.f18
export FTN19=OUTPUT/d02023a.f19
export FTN20=OUTPUT/d02023a.f20
export FTN21=OUTPUT/d02023a.f21
export FTN22=OUTPUT/d02023a.f22
export FTN23=OUTPUT/d02023a.f23
export SOF1=OUTPUT/d02021a.sof1
export SOF2=OUTPUT/d02023a.sof2
export DBMEM=12000000
export OCMEM=2000000
cd /home/dan/nastran
mkdir -p /tmp/a956984d
/home/dan/nastran/bin/nastran.x <inp/d02023a.inp >OUTPUT/d02023a.f06
rm -rf /tmp/a956984d
##############################################

Hope this helps!
Dan

@maniin
Copy link

maniin commented Jan 31, 2018

Thanks Dan,
I try out again and update you

@ghost
Copy link

ghost commented Jul 27, 2020

There are 3 stages in this demo.
Phase1 is to generate SOL file for each substructure. It includes 1A, 2A and 3A. Hub, root and vane.
Phase2 is to use the above substructure SOL files, to form the final whole structure (windmill) and solve it. This is done in 4A.
Phase3 is to get different kind of results for each substructure. This is done in 5A. 6A and 7A.

I got SOL of 1A, but for 2A, the SOL is empty. Try to figure it out now.

@ghost ghost mentioned this issue Jul 29, 2020
@JuanP74
Copy link

JuanP74 commented Jul 29, 2020

Hi,
it works OK for me. Only have to modify the nastran script for 2nd and subsequent runs as follows:

#if [ -z "$SOF1" ]; then
#	export SOF1=$1.sof1
#fi
export SOF1=d02021a.inp.sof1

I am using Ubuntu nastran installation, the nastran script is the file /usr/bin/nastran

Run 4 (assembled structure) is not empty. Only diplacements and loads have been requested. I

attach it in case might be useful for someone else.
d02024a.inp.out.zip

more info in /um/INTR.TXT paragraph 1.10 and /um/SUBS.TXT

@ghost
Copy link

ghost commented Jul 30, 2020

Yes, that did the trick. Thank you very much.

sub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants