CASE
CASE
Mini tutorial on *CASE in Ansys LS-DYNA and
PRIMER
Creating and editing a master *CASE
Creating and editing child (sub) cases
The master *CASE summary panel
(choosing
which master *CASE is current, and other operations)
Other operations affected by *CASE
Version history
Maximum numbers of *CASE definitions in PRIMER:
Using *CASE inside include files
|
Mini-tutorial on *CASEThis section gives a summary of how the *CASE keyword is used in Ansys LS-DYNA, and how it is implemented in PRIMER . It also describes the terminology and colour scheme used in this section and in the online help texts inside PRIMER . Please read this before using *CASE in PRIMER as it explains some important concepts that you will need to understand. |
How *CASE is used in Ansys LS-DYNA
The *CASE keyword is used in two related but distinct ways in Ansys LS-DYNA input decks:
| (1) *CASE (with no further suffices) | Referred to as a " Master *CASE " in PRIMER |
|
This can be thought of as a "collector" keyword which owns one or more sub-cases (or " Child cases " in PRIMER )
|
|
|
(2) *CASE_BEGIN_
nnn
... other keywords *CASE_END_ nnn |
Referred to as a " Child case " in PRIMER |
|
These keywords define what is contained within child (sub-) cases. They always come in "begin ... end" pairs that surround other keywords, suffix _ nnn giving their child case number nnn .
|
|
Therefore a keyword deck might contain 10 child cases labelled (say) 101 to 110, and these can be used in arbitrary combinations within Master *CASE s. For example:
- Master *CASE 1 might contain child cases 101, 102, 103
- Master *CASE 2 might contain only child case 110
-
Master
*CASE
3 might contain child cases
101, 105, 108
... and so on.
When analysing an input deck containing *CASE Ansys LS-DYNA does the following:
-
Splits the input deck into N separate sets of files, where N is the number
of Master
*CASE
cards.
-
Each file contains:
- the keywords that are not in any case, referred to as being " in the main model " in PRIMER
- plus those defined within the child cases contained with the relevant Master *CASE definition.
- Then N separate analyses producing N separate sets of results are run.
More information can be obtained from the *CASE section of volume I of the Ansys LS-DYNA keyword manual.
How *CASE is implemented in PRIMER
PRIMER handles this problem by splitting items up into three categories:
When PRIMER is dealing with models that contain one or more *CASE cards it requires that a Master *CASE is current at all times, and only items in this master *CASE and in the main model are visible and available for editing. In order to work with items in backing store you must first make the master *CASE containing them current. This organisation is expressed in the diagram on the right. The user may make a new master *CASE current at any time, but this is quite an expensive process since it requires a lot of internal processing (see " Changing the current Master *CASE " below) so it is best done only when necessary. |
|
The "Backing store" referred to above is still in main memory, not on disk, nevertheless changing the currently active Master *CASE can be quite a slow operation when a model is large.
How PRIMER handles multiple definitions of the same item in different cases
Consider the following two sequences of keywords, each of which define versions of *NODE label 1.
|
|
|||||||
|
In this left hand example we have two separate definitions of node 1 (here with different coordinates): one in child case 1 and one in child case 2. It is clear that changing one definition, for example in child case 1, should not have any effect on the definition in the other child case. In PRIMER the two definitions are referred to as being " aliases " of one another. |
|
In this right hand example we have a single definition of node 1 that is common to child cases 1 and 2. It is clear that editing the definition, say changing a coordinate, should result in a change in both child case 1 and child case 2. In PRIMER the two definitions of Node 1 are referred to as being " in combination " with one another. |
Clearly the alias definitions on the left above must be stored separately since they are independent, and editing one definition will not make any changes in the other.
However PRIMER also stores each combination definition separately as well. This is necessary because, despite being in combination, the two definitions of node 1 in the right hand column above might have different locations in space or boundary conditions if parameters are used to define those data fields, or perhaps if the node is moved by a transformation. However if a definition that is in combination is edited within PRIMER then all copies of it are also edited, whether current or in backing store, to preserve their combination status.
Also note that in a combination of cases the order in which the child cases are defined is irrelevant, so the two keyword sequences below are the same in PRIMER :
|
|
End of mini tutorial.
Creating and editing a master *CASE
From [Keyword]
use the
option to map the Master
*CASE
creation
and editing panel.
| Case is explicitly defined | This is explained below. |
| Label | Is the unique Master *CASE label |
| Jobid | Optional string |
| Title | Optional: used only by PRIMER |
| Command line input | Optional: any number of text lines giving command-line input to be used when the job is run |
Adding child (sub-)cases to this Master *CASE:
Child cases in PRIMER use the acronym CCAS (for Child CASe). You can add child cases to this master case by:
- Typing in the label of an existing child case.
- Using the right-click popup to select or create a child case
- Using Add... to select a range of existing child cases from a menu list
Removing child cases from this Master *CASE:
- Remove their labels from the list.
- Use Remove ... to select child cases to be removed.
The Ansys LS-DYNA syntax makes provision for a model in which *CASE_BEGIN_ nnn ... *CASE_END_ nnn cards appear, but no master *CASE cards are defined. In this situation every child case becomes an "implicit" master *CASE of the same label nnn.
In PRIMER this is handled by automatically creating a master *CASE of label nnn for each child case when keyword input is complete. To distinguish this from an explicitly defined master *CASE keyword PRIMER adds an "explicit" flag which will be set only if a master *CASE keyword was read, or created interactively.
The only difference between an explicit and an implicit master *CASE in PRIMER is that implicit master cases are not written to the keyword output file. In all other respects they are the same, and can be used in the same way. You can switch cases between implicit and explicit at will, however bear in mind that the Ansys LS-DYNA syntax only "auto creates" a master case for each child if there are no explicit master *CASE keywords in the model. So having a mixture of implicit and explicit master cases will result in the implicit ones being "lost" when the model is written to a keyword output file.
Creating and editing a child case |
||||
|
Using the right-click popup from an entry in the master *CASE panel above you can invoke the Child Case editing panel. |
![]() |
|||
![]() |
||||
|
This allows you to and . items of any type in the current child case.
|
||||
| Note: editing of a child case's contents is only possible from this panel if the child case is part of the current master *CASE . The child case editing panel will state whether it is or not. |
![]() |
||||||||
|
If the child case is not active in the current master *CASE this will be stated, and the and buttons will be greyed out. However you will still be able to sketch and list contents. The reason for this limitation is that child cases that are not current are on backing store, where their content is effectively "read only". |
|
||||||||
|
Prior to the
(to make the scratch
definition permanent)
PRIMER
checks all items selected for addition to or removal from this child case
to detect any such clashes, and gives you the following options if anty
such clashes are found:
|
|||||||||
Editing the child case membership of an item using the [C] button: |
|
|
Another, and much more flexible, way of editing the child case membership of an item is via the case membership editing button in the item's editing panel. This will only appear if the model contains *CASE data, and it will always be to the right of the file filter button for include files. This maps the child case membership editing panel for the item in question (here node 1531218): |
|
|
|
|
In this example the node is currently in the main model, and there are three child cases currently defined.
Master
*CASE
1, the current master case,
contains child cases 1 and 2.
At present the node is eligible for moving to any of the child cases, which can be done by ticking the relevant box in the column. |
|
|
|
|
The user has now ticked the Sel box for child case 1, and the following has happened:
|
|
|
|
|
The user has now chosen to place this node in child case 3 as well. This means that there will be a single combination definition of this node in child cases 1 and 3. If the keyword deck were written out at this point it would contain the lines: *CASE_BEGIN_1 |
|
|
: changing the definition from a combination to an alias . Let us suppose that the user does not want to have a single common definition, but rather two wholly separate definitions of this node in cases 1 and 3 - perhaps so that they can have different coordinates. The "separate child cases" button tells the editing panel that on update it should separate the single common definition into two. |
|
|
|
|
At this point it should be made clear that all edits to a definition's child case membership made in this panel are "pending", as with all changes made in an editing panel, and will only become permanent when the parent editing panel is updated and closed. So if we go through the update cycle for this node, then reopen it for editing and use the button again the following will be shown: |
|
|
|
|
If this deck were written to a keyword output file the lines for this node would now be written out twice as two separate definitions: *CASE_BEGIN_1 *NODE 1531218 1.0 2.0 (coordinates etc made up here) *CASE_END_1 *CASE_BEGIN_3 *NODE 1531218 1.0 2.0 (coordinates etc made up here *CASE_END_3 If we wished to merge these two alias definition back into a single combination definition, then ticking the box on the row for child case 3 would result in that change being made when the node editing panel was updated. To make this point clear we now:
|
|
|
|
|
We are now editing the definition of the node in child case 3, and you will see that the status above has been swapped round with the alias definition in child case 1 now on backing store. |
|
|
moving this definition out of the child case and back into the main model. If we select this option then the panel (still in child case 3) above becomes: |
|
|
|
|
|
|
|
resets case membership to its original state before editing. As explained above all changes made in the case membership editing panel are "Pending", and will only be made permanent when the parent editing panel (a node editing panel in the example above) is updated. Resetting case membership to its original state removes any edits and restores case membership to its state when the editing panel was first opened. |
|
Feedback from the [C] buttonThe colour of this button conveys information about the case membership status of the item being edited, and hovering the mouse over it will also give a summary of the current case status if the item being edited. |
|
Appearance (showing the status message given
by hovering the mouse over the button) |
Colour | Status |
|
Grey | The item being edited is in the main model, ie not currently in any child case. This will be the normal case for most items in most models. |
|
Green |
The item being edited is (or will be) in one or more child cases that are in the current master *CASE , ie currently active in the model. It may also be in combination with definitions on backing store, or have aliases on backing store. If this is the case the "hover over" message will give a summary of this. |
|
Cyan |
The item being edited will, if the edit proceeds, be moved into a child case which is not in the current master *CASE , and thus will be moved onto backing store. This means that when the editing panel is updated the item will disappear from the current model when it is moved to backing store. If it was referenced by something else in the model it will be replaced by a latent definition of the same label in the current model. |
|
Red |
The item being edited either exists in a clashing combination of child cases, or will do so if the edit proceeds. This is illegal since it would mean duplicate definitions of the same label in the model, and you should - hopefully! - never see this. (This example was created artificially for demonstration purposes, and if this situation ever arises you will be forced to resolve the case membership or label clash before updating the edit.) |
The [C]ase button in the Keyword editorIf a model contains *CASE data then all keyword editor panels will have a [C]ase column showing the current case membership of each row.
|
|
||||
|
Clicking on the relevant row button maps the same case management panel as above, which acts in exactly the same way. Note : Selecting multiple rows and clicking on the [C] button does not apply the case membership changes to all selected rows, but rather only to the row in question. This limitation may be removed in the future, but at the present time it is "too hard" to implement in this context. |
|||||
The Master *CASE summary panelBy default PRIMER will make the first master *CASE in a model the current one, but you can change the current master *CASE at any time using |
|
|
|
|
Changing the current master *CASEWhen you change to a new master *CASE the following operations are performed:
From reading the list above you will appreciate that this is a complicated and time-consuming process which may take quite a long time for a large model. Therefore it is best to try to organise your work so that you perform as few master *CASE change operations as possible. |
|
[Popup] Edit... Editing a master *CASEThis is just another way of getting to the master *CASE editing panel described above. You can edit any master *CASE, not just the current one. |
|
[Popup] Merge... Merging the contents of the current master *CASE into the main modelThis performs the following operations:
This operation is only available for the current master *CASE . To merge contents of other master *CASE s into the main model they must first be made current. This operation is not reversible! |
|
[Popup] Delete... Deleting a master *CASEAny master *CASE apart from the current one can be deleted. This deletes the master *CASE definition itself, but does not delete or merge or affect its child case contents in any way. This may result in child cases becoming "orphans", ie not referenced by any master *CASE . This is perfectly legal, and such definitions will still be written out in any keyword output file, but they will not be part of any subsequent Ansys LS-DYNA analysis. |
|
Eliminate all cases Removing all *CASE definitions from the modelThis performs the following operations:
WARNING: the outcome of this operation will probably delete data! You will see from the above sequence items currently on backing store are deleted, not moved into the main model. If you want to move these into the main model you will need to make a master *CASE containing them current and merge this into the master model. Therefore this is a simple and quick way of removing all case information from a model, but if the details of what are to remain are important it may be better to perform a more selective merge process, or even to process individual items. |
Other operations affected by *CASE
The following operations are influenced by *CASE , and may require consideration.
Model WRITE and *CASE
When a model containing *CASE information is written out to a keyword file PRIMER will retain the logical case organisation, although the order in which keywords appear may change.
Also PRIMER will never use the syntax
*KEYWORD CID=nnn
data
during keyword output, always replacing it with
*CASE_BEGIN_nnn *KEYWORD data *CASE_END_nnn
This gives rather more verbose output, but the functionality is identical.
Model COPY and *CASE
When a model containing *CASE is copied to another model inside PRIMER the case-specific organisation and data will be retained completely.
Model MERGE and *CASE
When two models are merged, and either of them contain *CASE data, then PRIMER retains this in the output model.
However in the situation where both models contain either master or child case definitions of the same label PRIMER does not merge the case definitions , rather it applies the same "increment labels to avoid clashes" logic that it applies to other keywords, retaining separate cases in the merged model.
This is best illustrated by example. In the following example the "increment labels in secondary (model 2) to avoid clashes" option has been chosen
| Source model 1 | Source model 2 | Result in output model 3 |
| Master *CASE 1 | Master *CASE 1 |
Master *CASE 1 (
was 1 in model 1
)
Master *CASE 2 ( was 1 in model 2 ) |
|
Child case 1
Child case 2 |
Child case 1
Child case 2 Child case 3 |
Child case 1 (
was 1 in model 1
)
Child case 2 ( was 2 in model 1 ) Child case 3 ( was 3 in model 2 ) Child case 4 ( was 1 in model 2 ) Child case 5 ( was 2 in model 2 ) |
If you wish to merge the contents of child cases in the output model you will have to do this manually.
*CASE and include files.
PRIMER 12 allows you to move include files into and out of child cases, and it also obeys the Ansys LS-DYNA limitation that the *CASE keyword may not be used in include files. This means that the sequence [in the master file]
*CASE_BEGIN_xxx
*INCLUDE
filename
*CASE_END_xxx
Requires that all items in include filename , and all its descendants, are explicitly in child case xxx. PRIMER checks for this when running the standard "check" functions, and also when editing case membership where it will warn you if you try to change the case membership of an item in an include file to something different to that of the include file itself.
*CASE plus *INCLUDE_TRANSFORM, *NODE_TRANSFORM and *PART_MOVE
PRIMER 12 allows these "transform" keywords to be used with *CASE and should deal with all permutations of them correctly.
Moreover it should be possible to have:
- These "transform" keywords in child cases or the main model
- *DEFINE_TRANSFORMATION cards referred to by these in different cases
- All of the above using *PARAMETER definitions in yet other cases.
But please note the word "should" in the sentence above. It is possible to pile complication upon transformation upon further complication using the keywords above, and while we believe that it works it is entirely possible that attempting to edit a fiendishly complex permutation of these keywords may not behave correctly. A moment's thought about the internal house-keeping required to process them will reveal why this is the case.
If you use these keywords in combination to create multiple input decks please try to keep usage simple!
Selection from Object menus and *CASE
Object menus provide support for items in cases in two ways:
If an item is in a child case this fact is appended to the menu listing.In the example here loadcurves 31 and 32 are both in child case 10 |
|
|
Filtering by child case is availableThis can make it easy to "drill down" to the items of interest in a child case. Note that "Main Model only" is available as an option here, which is the same as saying "not in any child case". |
|
|
Cross-references and *CASE
Within the current model internal cross-references are created normally, regardless of whether referrer or referee are in a child case or in the main model. For example a PART referred to by a SHELL that is in a child case will show that it is referred to by that shell, and this reference will "lock" the part against deletion.
|
In addition the cross-reference editor will show that a reference is from an item in a child case that is in the current model. PART 1 in this example is referred to by shells 3 and 4 in the main model, and shells 1 and 2 in child case 1. |
|
However what happens when a PART in the main model is referred to by a SHELL that is in a child case that is not current, ie on backing store? There are three possible solutions to this problem:
- Use normal cross-references from items in backing store.
- Do not have any cross-references from items in backing store.
- Use modified "special" references from items in backing store.
A brief discussion of the pros and cons of each of the options above will help to explain why option (3), modified references, has been chosen despite some minor disadvantages.
(1) Use normal cross-references from items in backing store.
This has the advantage that an item in the main model "knows" that it is needed by something in a child case that is not current, and this locks it against deletion. However it presents several problems:
-
PRIMER
uses cross-reference lists for many purposes such as graphics, calculation
of mass, connectivity checks (eg free edge display, "find attached")
and so on. Clearly we do not want to draw items in cases currently in
backing store, nor do we want these items to contribute to mass or inertia
calculations, etc.
Therefore it would be necessary to make some sort of distinction between an "active" reference from an item in the current model, and a "passive" one from an item on backing store. This would be possible, but it would be difficult to maintain and apply properly in all possible contexts and would be a possible cause of hard-to-find errors.
-
The user would see cross-references from multiple instances of an
item. For example there might be two references to a
PART
from
SHELL
label 1: one would be current
and the other on backing store.
Again, it would be possible to show a distinction between these but they would clutter up the cross-reference lists and there would be the potential for confusion between these and multiple "clone" definitions in the current model.
Faced with the problems above the "normal cross-reference" method has been rejected as being too difficult to implement safely.
(2) Do not have any cross-references from items in backing store .
This has the merit of simplicity, and it solves the problems cited in (1) above: no duplication of mass or connectivity, and no confusing multiple references. However it presents two major problems:
-
Items in the main model would not "know" that they might
be referred to when an item in a child case currently in backing store
is made current, and they would not be locked against deletion. Therefore
a "Cleanup unused" or a selective deletion might remove things
that are actually needed.
- Just as importantly a reference to something inside PRIMER is not an integer label, but rather a "pointer" to the actual address in memory used to store that item. For example when SHELL 1 in backing store refers to PART 1 in the main model the reference is to the address of PART 1 in memory. Therefore if that definition of PART 1 is deleted things go horribly wrong, which is why cross-references are so important!
Therefore having no cross-references from items in backing store is simply not possible given the internal architecture of PRIMER .
(3) Use modified "special" references from items in backing store.
So the solution adopted is to make a cross-reference to an item in the main model from items in backing store, so that the main model item is locked against deletion, but in a way that is different to normal cross -references. This is done as follows:
- Any "normal" references from the item moved to backing store to items in the main model are removed.
- However a single generic reference from the child case is inserted instead.
|
This example shows how this appears in the cross-reference editor as a reference from a CHILD_CASE : Here PART 1 "knows" that items in child case 2 currently on backing store refer to it, and this locks it against deletion. Only a single cross-reference from the child case is made, regardless of how many items within it reference the item in the main model. |
|
This method is not perfect since it is not possible to tell exactly what in child case 2 references this part, the only way to do that would be to make a Master *CASE containing child case 2 current. However it is simple, it works and it solves the objections identified in methods (1) and (2) above.


