This article explains how to change the scratch directory used by Simcenter Nastran. We cover multiple methods for doing this and clarify the order of precedence when different methods are used.
By default, Nastran uses the directory defined by the TEMP environment variable as its scratch directory. One way to check the current value of this variable is to open a Command Prompt and type:
echo %TEMP%
However, in some cases, it may be useful to modify the scratch folder that is used by Nastran. There are two methods for doing this: using the Simcenter 3D GUI or editing the Nastran *.rcf file.
1. Changing the scratch directory in the Simcenter 3D GUI
To change the scratch directory via the Simcenter 3D interface:
1. Open the relevant .sim file in Simcenter 3D.
2. In the Simulation Navigator, right-click the solution you want to solve and select Edit Solver Parameters.
3. In the dialog box that appears, enter the desired scratch directory path in the sdirectory field.
Refer to the following image for guidance:
You can also set the scratch directory as a default for all new solutions by updating the Customer Defaults settings:
1. Go to File Menu > Utilities > Customer Defaults.
2. Navigate to Simulation > Pre/Post > Nastran > Solver Parameters.
3. In the Nastran Solver Scratch Directory section, specify the directory in the Windows field.
Refer to this image for more details:
Please note that setting the scratch directory in Customer Defaults will automatically populate the 'sdirectory' field in the Solver Parameters dialog box. However, this change will only apply to newly created solutions, not to existing ones.
2. Changing the scratch directory in the Nastran .rcf file
Alternatively, you can set the scratch directory in the Nastran configuration file (nastran.rcf). This file is usually located at:
[NX_install_dir]\NXNASTRAN\conf\nastran.rcf
(e.g. C:\Program Files\Siemens\Simcenter3D_2406\NXNASTRAN\conf\nastran.rcf)
To specify a scratch directory, add a line similar to the following one to the file:
sdirectory=C:\scratch\
If multiple methods are used to specify the scratch directory, Simcenter Nastran follows this order of precedence:
1. sdirectory specified in the Solver Parameters dialog box in Simcenter 3D.
2. sdirectory specified in the Nastran *.rcf file
3. TEMP environment variable
Finally, for more details about the Nastran scratch folder, the reader can consult the Simcenter Nastran Installation and Operations Guide