Files
김경종 b7f84e1c0f
Tests / Hermetic test suite (push) Has been cancelled
Tests / Skill frontmatter validation (push) Has been cancelled
add documents
2026-05-29 15:59:56 +09:00

13 KiB
Raw Permalink Blame History

20.2.2 aStudy.constrain(): Constrain parameter value combinations in parametric studies.

Products: Abaqus/Standard Abaqus/Explicit

This command is used to define constraints on parameter value combinations; combinations that violate any of the constraints are eliminated from the parametric study.

Reference:

• “Scripting parametric studies,” Section 20.1.1

Command:

aStudy.constrain (constraint expression)

Required data:

constraint expression

Provide a constraint expression enclosed by matching quotation marks. This expression may involve operations among parameters, numbers, and previously defined Python variables; for example, height*width < maxArea-2.0. The constraint can be an equality or an inequality.

20.2.3 aStudy.define(): Define parameters for parametric studies.

Products: Abaqus/Standard Abaqus/Explicit

This command is used to define the parameters specified for a parametric study.

Reference:

• “Scripting parametric studies,” Section 20.1.1

Command:

aStudy.define (token, additional data)

Tokens:

CONTINUOUS

Use this token to indicate that the parameter is continuous valued.

DISCRETE

Use this token to indicate that the parameter is discrete valued.

PRINT

Use this token to print parameter definitions.

Additional data for CONTINUOUS:

Required data:

par

Set par equal to the name of the parameter or the sequence of parameters being defined. If a single parameter is specified, it must be enclosed by matching quotation marks; for example, par1. If a list of parameters is specified, it must be given inside parentheses or brackets and must contain parameter names enclosed by matching quotation marks and separated by commas; for example, (par1, par2, par3) or [par1, par2, par3].

Optional data:

domain

Set domain equal to the minimum and maximum values of the parameter separated by a comma and enclosed by parentheses or brackets; for example, (10., 20.) or [10., 20.].

If domain is omitted from this command and the parameter is later sampled using a method that requires a domain definition, the domain must be specified in the sample command.

reference

Set reference equal to the reference value of the parameter.

If reference is omitted from this command and the parameter is later sampled using a method that requires a reference definition, the reference must be specified in the sample command.

Additional data for DISCRETE:

Required data:

par

Set par equal to the name of the parameter or the list of parameters being defined. If a single parameter is specified, it must be enclosed by matching quotation marks; for example, par1. If a list of parameters is specified, it must be given inside parentheses or brackets and must contain parameter names enclosed by matching quotation marks and separated by commas; for example, (par1, par2, par3) or [par1, par2, par3].

Optional data:

domain

Set domain equal to the sequence of values that the parameter may have. The values must be separated by commas and enclosed by parentheses or brackets; for example, (1., 2., 5., 3.) or [1., 2., 5., 3.].

If domain is omitted from this command and the parameter is later sampled using a method that requires a domain definition, the domain must be specified in the sample command.

reference

Set reference equal to the index in the sequence of parameter values. Indexing starts at zero, so that the first value of the sequence corresponds to index zero and the last value of the sequence corresponds to an index equal to the number of values in the sequence minus one.

If reference is omitted from this command and the parameter is later sampled using a method that requires a reference definition, the reference must be specified in the sample command.

Additional data for PRINT:

Optional data:

par

Set par equal to the name of the parameter or the sequence of parameters whose definition is to be printed. If a single parameter is specified, it must be enclosed by matching quotation marks; for example, par1. If a sequence of parameters is specified, it must be given inside parentheses or brackets and must contain parameter names enclosed by matching quotation marks and separated by commas; for example, (par1, par2, par3) or [par1, par2, par3].

If par is omitted, parameter definitions are printed for all parameters in the parametric study.

20.2.4 aStudy.execute(): Execute the analysis of parametric study designs.

Products: Abaqus/Standard Abaqus/Explicit

This command is used to execute the analyses of the designs generated by a parametric study.

Reference:

• “Scripting parametric studies,” Section 20.1.1

Command:

aStudy.execute (token, execOptions= , additional data)

Tokens:

ALL

Use this token to sequentially execute the analyses of all the designs of the parametric study. This option is the default.

DISTRIBUTED

Use this token to execute the analyses of all designs using the specified queue interfaces of the local and/or remote computers. A similar number of analyses will be distributed to each of the specified queues.

INTERACTIVE

Use this token to sequentially execute the analyses of all the designs of the parametric study in interactive mode. In this case the process pauses to prompt you for further execution instructions. The prompt allows you to specify the number of analyses to be executed, to execute the remaining analyses, to specify the number of analyses whose execution is to be skipped, or to skip all the remaining analyses.

Optional data:

execOptions

Set execOptions equal to a character string of Abaqus execution options (refer to “Abaqus/Standard, Abaqus/Explicit, and Abaqus/CFD execution,” Section 3.2.2) that are to be added to the Abaqus execution command when executing the analyses of the designs of the parametric study; this string must be enclosed in matching quotation marks.

Additional data for DISTRIBUTED:

Required data:

queues

Set queues equal to the queue interface name or a sequence of queue interface names. If a single name is given, it must be enclosed in matching quotation marks. If a sequence of names is given, it must be

enclosed in parentheses or brackets and contain queue interface names enclosed in matching quotation marks and separated by commas.

Optional data:

files

Set files equal to the symbolic constant or a sequence of symbolic constants that identifies the file or files that must be returned to the local computer after remote execution. The sequence items must be separated by commas, and the sequence must be enclosed in parentheses or brackets.

The allowed symbolic constants are: DAT, LOG, FIL, SEL, MSG, STA, ODB, IPM, RES, ABQ, and PAC. The default value is files = (DAT, FIL, LOG, ODB, SEL).

Defining queues and queue interfaces:

Before being used for a distributed parametric study, queue interfaces must be defined within the design_startup portion of the Abaqus environment file. For example, to define a queue interface for an existing queue short on the remote computer server, the following entry in the environment file is required:

def onDesignStartup():
    from par_Session import Queue
    import os

    # convenience assignment
    SCRATCH = '/scratch/' + os.environ['USER']

    # create remote queue interface
    Queue(name='short_interface', hostname='server', driver='abaqus', queueName='short', directory=SCRATCH) 

If, in addition, a local queue is required, the entry must be expanded to:

def onDesignStartup():
    from par_Session import Queue
    import os

    # convenience assignment
    SCRATCH = '/scratch/' + os.environ['USER']

    # create remote queue interface
    Queue(name='short_interface', hostname='server', driver='abaqus', queueName='short', directory=SCRATCH)

    # create local queue interface
    Queue(name='local_interface', driver='abaqus', 
queueName='local')
queue name="local" 
local="echo "./%S 1>%L 2>&1" | batch"

20.2.5 aStudy.gather(): Gather the results of a parametric study.

Products: Abaqus/Standard Abaqus/Explicit

This command is used to gather analysis results across the designs of a parametric study.

Reference:

• “Scripting parametric studies,” Section 20.1.1

Command:

aStudy.gather (request= , results= , step= , frameValue= | inc= | mode= , variable= , additional data)

Required data:

results

Set results equal to a name that will be used to identify the results record gathered by this command. This name must be enclosed in matching quotation marks.

variable

Set variable equal to an output variable identifier key; this key must be enclosed in matching quotation marks.

For gathering results from the results (.fil) file only those output variable identifier keys appearing under the .fil column heading in “Abaqus/Standard output variable identifiers,” Section 4.2.1, or “Abaqus/Explicit output variable identifiers,” Section 4.2.2, are available. For example, the U or S variable identifier keys can be specified, but the U1 or S11 variable identifier keys cannot be specified. In addition, the MODAL variable identifier key can be specified to gather frequency results (those written to the results file with the record key 1980); in this case no additional data are required in this command.

When gathering results from the output database (.odb) file, each result record to be gathered is chosen by specifying one of the available output variable identifier keys appearing under the .odb column heading in “Abaqus/Standard output variable identifiers,” Section 4.2.1, or “Abaqus/Explicit output variable identifiers,” Section 4.2.2. For field output the component must not be specified, while for history output the component number is required; for example, the U or S variable identifier keys can be specified for field output, while the U1 or S11 variable identifier keys can be specified for history output.

Optional data:

request

This option is applicable only if the results are to be gathered from the output database file.

Set request equal to FIELD or HISTORY to specify whether the results must be gathered from the field data or the history data in the output database file.

If request is omitted from this command, the results will be gathered from the field data.

step

Set step equal to the analysis step number from which the results are to be gathered.

If step is specified in this command as well as in the output command, the step specification in this command is used.

If step is omitted from this command, it must have been specified in the output command.

Optional and mutually exclusive data:

frameValue

This option is applicable only if the results are to be gathered from the output database file.

Set frameValue equal to the step time or frequency value of the analysis increment in the analysis step specified from which the results are to be gathered. frameValue can also be set equal to the symbolic constant LAST to specify that results are to be gathered from the last increment of the step. If no results are available at the frameValue specified, a warning will be issued and the results will be gathered from the closest increment.

If frameValue is specified in this command as well as in the output command, the frameValue specification in this command is used for gathering.

If frameValue is omitted from this command, the results are gathered for the frameValue specified in the output command or are gathered from the last increment in the step.

inc

Set inc equal to the number of the analysis increment of the non-frequency analysis step specified from which the results are to be gathered across the parametric study variations. inc can also be set equal to the symbolic constant LAST to specify that results are to be gathered from the last increment of the step.

If inc is specified in this command as well as in the output command, the inc specification in this command is used for gathering.

If inc is omitted from this command, the results are gathered from the increment specified in the output command or are gathered from the last increment in the step.

This option is not valid for gathering history results from the output database file.

mode

Set mode equal to the number of the mode of the frequency analysis step specified from which the results are to be gathered across the parametric study variations.

If mode is specified in this command as well as in the output command, the mode specification in this command is used.

If mode is omitted from this command, the results are gathered from the mode specified in the output command or are gathered from the first mode in the step.