×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Can we use an IF statement in the input deck?

Can we use an IF statement in the input deck?

Can we use an IF statement in the input deck?

(OP)
I'm modeling a wing where the upper skin buckles under upward bending loads. The current plan is to use two models, one with nominal material stiffness in the skin for downward bending loads, and one with a knocked down anisotropic material stiffness in the skin for upward bending loads.

I'd like to be able to have a single model with both sets of material cards, and have Nastran use one set of material properties or the other based on a flag I would set. That would mean not having to maintain two sets of everything else in the model. Is there a good way to do that? The best I can come up with is to break out the material properties into an include file, and supply one or the other.

RE: Can we use an IF statement in the input deck?

A single model with both sets of material cards would not be possible in NASTRAN, as the PSHELL refers to a unique MID.

Superelements could be a way out, but it depends on what is the flag that you want to set?

On the other hand, I would suggest doing a SOL106, with the actual material properties of the skin. The SOL106, would consider the effects of local buckling and re-distribute the loads accordingly, which IMO is more accurate and efficient way of doing it.

RE: Can we use an IF statement in the input deck?

(OP)
Thanks for the response. I'd like to avoid the computational cost of running a nonlinear solution for this phase of the analysis, although I agree that a nonlinear buckling analysis would be more accurate.

Could you go into a little more detail on how superelements could be applied here?

RE: Can we use an IF statement in the input deck?

Do you have a unique LOAD id for the up-bending and down-bending loads or rather what kind of a flag were you planning on providing?

RE: Can we use an IF statement in the input deck?

(OP)
Well, there are a number of up-bending and down-bending load cases. The flag I was hoping for would be some sort of parameter or something that I could define in the input deck. I've never seen anything that would allow for something like that, but I was hoping I'd missed something. It might be something that would require some DMAP code, which I'm entirely unfamiliar with.

RE: Can we use an IF statement in the input deck?

Doing such a thing with DMAP would be really a very complicated thing to do.

Putting things in perspective:

> I'd like to be able to have a single model with both sets of material cards, and have Nastran use one set of material properties or the other based on a flag I would set.

This is possible in a single model using the symbolic substitution option in Nastran.

Below is a sample input file:

sol 101
cend
title=simple beam example
echo=both
subcase 1
load=1
disp=all
elforce=all
spcf=all
begin bulk
grid,1,,0.0,0.0,0.0
grid,2,,1.0,0.0,0.0
cbar,1,1,1,2,0.,1.,0.
pbar,1,1,1.,1.,1.,1.
mat1,1,1.e7,,.3
force,1,1,,1.,1.,1.,1.
$
grid,2,,1.0,0.0,0.0
grid,3,,2.0,0.0,0.0
grid,4,,3.0,0.0,0.0,,123456
cbar,2,2,2,3,0.,1.,0.
cbar,3,2,3,4,0.,1.,0.
pbar,2,%mat%,1.,1.,1.,1.
$ Alum
mat1,2,1.e7,,.3
$ Steel
mat1,3,3.e7,,.3
$
enddata

Notice the pbar,2, having a wildcard %mat% for the material definition field.
Two material ID's are defined after this, namely one for aluminum and the other for steel.

Choosing which material ID to use can be specified in the Nastran command line when you submit the job, such as

C:\MSC.Software\MSC_Nastran\bin\nastran input_file.dat repsym=mat=2

Notice the use of the "repsym" keyword. This tells Nastran to search for the wildcard "%mat%" in the input file and use the ID=2.

If you want to use the ID=3, then, C:\MSC.Software\MD_Nastran\bin\mdnastran input_file.dat repsym=mat=3

What I would do is to gather all the up-bending cases into one I/p file and run the job with the knocked-down material stiffness ID, and then
gather all the down-bending cases into another file and run the job with the nominal material stiffness ID.

So essentially have two runs, but the model still would be the same.

Hope this helps!

RE: Can we use an IF statement in the input deck?

(OP)
Big help, thanks!

RE: Can we use an IF statement in the input deck?

(OP)
I finally got a chance to try this out. It looks like symbolic substitution is an MSC feature, added in 2008. NX Nastran, which is what I use, doesn't appear to have anything similar. I do thank you for your help, though, nlgyro!

RE: Can we use an IF statement in the input deck?

That's correct. But your problem can also be tackled using superelements as I earlier quoted.

This is supported in both MSC & NX flavors of Nastran.

Are you familiar using SE's?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources