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.
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?
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?
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?
RE: Can we use an IF statement in the input deck?
RE: Can we use an IF statement in the input deck?
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?
RE: Can we use an IF statement in the input deck?
RE: Can we use an IF statement in the input deck?
This is supported in both MSC & NX flavors of Nastran.
Are you familiar using SE's?