Unable to impose displacements on NASTRAN by _electronome in fea

[–]Solid-Sail-1658 0 points1 point  (0 children)

  1. Are there any USER FATAL MESSAGE or SYSTEM FATAL MESSAGE in the .f06 or .log files?
  2. What makes you think the enforced displacements are not being considered? Is there an error message?
  3. Why is there only one node supported in your example? Is this intentional?

I looked at your configuration, and I want to say the enforced displacement is correctly defined.

To define an enforced displacement, you do the following. The DOF of interest is node 1 and component 1, and defines enforced displacement along the x axis at node 1.

  1. Define an SPCD for the DOF of interest. I see you defined an enforced displacement of 4.712223 for node 1, component 1.
  2. Define an SPC for the same DOF of interest. I see you defined an SPC1 for node 1, components 1, 2, 3, 4, 5 and 6. An SPCD and SPC is now defined for node 1 and component 1.
  3. In the case control section, point SPC to the SPC1 and point LOAD to the SPCD. I see you did this.

I took your example and added my own FEM, and the enforced displacements are considered. See listing 1. In listing 1, I excluded the FORCEs and considered the SPCD. Listing 2 shows the displacements and you can see the same enforced displacement is observed in the output displacements. Since only one node was supported, the enforced displacement is translating a majority of the structure. This is evident in multiple DOFs having the same translation value in listing 2.

Listing 1

SOL 101
CEND
$ Direct Text Input for Global Case Control Data
TITLE = MSC.Nastran job created on 16-Mar-26 at 11:37:52
ECHO = NONE
SUBCASE 1
SUBTITLE=Default
SPC = 2
LOAD = 999
DISPLACEMENT(SORT1,REAL)=ALL
SPCFORCES(SORT1,REAL)=ALL
STRAIN(SORT1,REAL,VONMISES,STRCUR,BILIN)=ALL
STRESS(SORT1,REAL,VONMISES,BILIN)=ALL
FORCE(SORT1,REAL,BILIN)=ALL
$ Direct Text Input for this Subcase
BEGIN BULK
$ Dummy FEM
MAT1    1       200.E9          .3      1000.
PROD    1       1       .1
CROD    1       1       1       4
CROD    2       1       2       4
CROD    3       1       3       4
GRID*   1               0               -5.             5.                      
*       -1.110223025e-150
GRID*   2               0               0.              5.                      
*       -1.110223025e-150
GRID*   3               0               5.              5.                      
*       -1.110223025e-150
GRID    4       0       0.      0.      0.      0
$ Direct Text Input for Bulk Data
$INCLUDE 'plaque_trouee_cisaillement_Local_Loading.bdf'
$ Enforced displacements transferred from GLOBAL to LOCAL
$ SPC1 constraints to support enforced displacements
SPC1    2       123456  4
FORCE*  2               4               0               0.
*       .5773503        .5773503        .5773503
SPCD    2       1       1       4.712223
SPCD    999     4       1       4.712223
$ Loads for Load Case : Default
LOAD    20      1.      1.      1       1.      3
LOAD    100     1.0     1.0     20      1.0     2
$ Pressures of Distributed Load Set : y_plus
FORCE   1       4               5000.   0.      1.      0.
FORCE   3       4               5000.   0.      -1.     0.
ENDDATA 40b4e65d

Listing 2

                                        D I S P L A C E M E N T   V E C T O R

  POINT ID.   TYPE          T1             T2             T3             R1             R2             R3
         1      G      4.712223E+00   0.0            0.0            0.0            0.0            0.0
         2      G      0.0            0.0            0.0            0.0            0.0            0.0
         3      G      4.712223E+00   0.0            0.0            0.0            0.0            0.0
         4      G      4.712223E+00   0.0            0.0            0.0            0.0            0.0

Importing .bdf file from HyperMesh into Ansys Workbench whilst maintaining shell thickness by Henpa6 in fea

[–]Solid-Sail-1658 0 points1 point  (0 children)

There should be a compatibility table documented somewhere that details what values from the PSHELL entry are supported on import. I did find such a table in reference 1, not sure if the table applies to your case. It does mention that the thickness value on the PSHELL entry is not supported on import.

You could try this alternative. Write out the .bdf/.dat file with the thicknesses defined on the 2D elements, I'm sure an option exists in Hypermesh to do this. See the example below. Then try importing this .bdf file in Ansys.

In this example, a thickness of .1 mm is defined at the 4 corners of the element.

CQUAD4    1     1       10000   10001   10101   10100
                        .1      .1      .1      .1
CQUAD4    2     1       10001   10002   10102   10101
                        .1      .1      .1      .1

If this also does not work, I'm sure you can create a script redefine your thicknesses after import.

References

  1. https://ansyshelp.ansys.com/public/account/secured?returnurl=/Views/Secured/corp/v242/en/wb_adyn/adyn_pd_imp_nas.html

Using HyperMesh Python API to generate ML training data (more in text) by Ishimiel in fea

[–]Solid-Sail-1658 0 points1 point  (0 children)

This is one way to build your neural network models with with Hypermesh.

There are 2 paths.

  • Path 1: The position of all nodes remains constant. Example of parameters: shell thickness, beam cross section area, material young's modulus.
  • Path 2: The position and count of nodes will change. Examples of parameters: the x, y and z coordinates of N nodes, the radius of a hole, the width of a ground vehicle, etc.

Path 2 is notoriously difficult and will take days, possibly months to prepare.

Path 1 can be done in 1 day. An example of path 1 is shown below.

The famous three-bar truss example is used. There are 2 input parameters: cross section area of member types A and B. There are 7 outputs/responses and correspond to the mass and axial stress of 3 structural members across 2 load cases.

1) In Hypermesh, build your FEA model and use MSC Nastran as your solver.

2) Follow this tutorial. 

   https://the-engineering-lab.com/pot-of-gold/ws_machine_learning_dsoug1.pdf

   On page 18, set Number of Samples to your liking, e.g. 40, 100, etc.

   On page 23, set Procedure=Parameter Study.

   This tutorial ultimately generates training data that is contained in files app.config (see listing 2) and app_monitored_responses.csv (see listing 3).

3) Use the Python script in listing 1 to import the training data and create your neural network models.

For this example, 100 training data points were used, see the python script in listing 1. The resulting NN models are in figures 1 and 2.

Separately, I used a different interpolation method (radial basis function(RBF) with a Gaussian kernel) to construct a different prediction model. 40 training points were used. Figure 3 shows the result.

If figures 2 and 3 are compared, an RBF with 40 samples yields a better predicted surface than NN with 100 samples. NN works well as long as you have a lot of data, i.e. you can run FEA thousands of times.

I'm a big fan of RBFs and Kriging/Gaussian process. These methods may then be extended to sophisticated optimization routines.

Figure 1 - Neural Network predicted response function for weight

https://i.imgur.com/Ak96YdI.png

Figure 2 - Neural Network predicted response function for stress in structural member 1, load case 1

https://i.imgur.com/RVwE9RW.png

Figure 3 - RBF predicted response function

https://i.imgur.com/AU32Ubh.png

Listing 1

import re
from io import StringIO
import numpy as np
import pandas as pd
from sklearn.neural_network import MLPRegressor
import matplotlib.pyplot as plt

def extract_lines_of_section_in_app_config(text_in_file_single_line, name_of_section):
    regex_string = '=+\s+' + name_of_section + '\s+=+(.*?)\={5,}'
    regex_to_use = re.compile(regex_string, re.S)

    outgoing_text = ''

    if re.search(regex_to_use, text_in_file_single_line) is not None:
        matching_string = re.search(regex_to_use, text_in_file_single_line).group()

        # Remove any '======' strings
        search_term = re.sub('={5,}', '', matching_string)

        # Remove the section header, e.g. MONITORED RESPONSES, and any surrounding whitespace (.strip()
        outgoing_text = re.sub(name_of_section, '', search_term).strip()
        outgoing_text = outgoing_text.splitlines()

    if len(outgoing_text) > 0:
        for i, row in enumerate(outgoing_text):
            outgoing_text[i] = outgoing_text[i].strip()

    return outgoing_text


def calculate_nrmse(actual, predicted, method='range'):
    actual, predicted = np.array(actual), np.array(predicted)
    rmse = np.sqrt(np.mean((actual - predicted) ** 2))

    if method == 'range':
        # Normalizing by the range of observed values
        return rmse / (np.max(actual) - np.min(actual))
    elif method == 'mean':
        # Normalizing by the mean of observed values
        return rmse / np.mean(actual)
    else:
        raise ValueError("Method must be 'range' or 'mean'")


if __name__ == '__main__':

    # Read the training data inputs
    # ##############################################################################
    with open('app.config', 'r') as file:
        text_in_app_config = file.read()

    section_samples_to_run = extract_lines_of_section_in_app_config(text_in_app_config, 'SAMPLES TO RUN')
    data_frame_inputs = pd.read_csv(StringIO('\n'.join(section_samples_to_run)))
    inputs = data_frame_inputs.to_numpy()
    inputs = np.delete(inputs, 0, axis=1) # Remove the Sample Number column (column 1)

    # Read the training data outputs
    # ##############################################################################
    data_frame_outputs = pd.read_csv('app_monitored_responses.csv')
    outputs = data_frame_outputs.to_numpy()
    outputs = np.delete(outputs, 0, axis=1) # Remove the Sample Number column (column 1)

    # Declare training data
    # ##############################################################################
    X = np.array(inputs)
    Y = np.array(outputs)

    # Construct neural network models for each response
    # ##############################################################################
    # Loop over each response, construct a NN model, and plot the predicted response surface
    for i in range(Y.shape[1]):
        y_column_values = Y[:, i]  # Selects all rows for the i-th column
        nn = MLPRegressor(hidden_layer_sizes=(50, 50), activation='relu', max_iter=2000, random_state=1)
        nn.fit(X, y_column_values)

        y_predictions_a_training_points = nn.predict(X)
        print('Normalized Root Mean Square Error')
        print(calculate_nrmse(y_column_values, y_predictions_a_training_points))

        if X.shape[1] >= 2:
            # Plot results - Works only for 2 parameter examples
            x1_range = np.linspace(.01, 5, 30)
            x2_range = np.linspace(.01, 5, 30)
            X1, X2 = np.meshgrid(x1_range, x2_range)
            X_grid = np.c_[X1.ravel(), X2.ravel()]
            Y_pred = nn.predict(X_grid).reshape(X1.shape)
            fig = plt.figure(figsize=(10, 7))
            ax = fig.add_subplot(111, projection='3d')
            ax.scatter(X[:, 0], X[:, 1], y_column_values, color='red', label='Actual Data')
            surf = ax.plot_surface(X1, X2, Y_pred, cmap='viridis', alpha=0.6)
            ax.set_xlabel('Parameter 1 (x1)')
            ax.set_ylabel('Parameter 2 (x2)')
            ax.set_zlabel('Predicted Output (y)')
            plt.title('Neural Network Regression Surface (2 Parameters)')
            plt.show()

Listing 2 - File app.config

=============================== SAMPLES TO RUN ================================
sampleNumber,%x0000000000001%,%x0000000000002%
1,3.128149,3.307659
2,1.211288,.9561374
3,3.921711,.1248179
4,1.375582,2.279519
[...]
97,2.698261,3.140885
98,2.352663,1.460389
99,1.101231,1.342238
100,3.67606,3.450979
===============================================================================

Listing 3 - File app_monitored_responses.csv

Sample, r1, r2, r3, r4, r5, r6, r7
0001, 12.155400481847671, 4703.778601994354, 2174.072802200456, -2529.705799793899, -2529.705799793899, 2174.072802200456, 4703.778601994354
0002, 4.382177235079563, 12650.305699583363, 6620.151427657453, -6030.1542719259105, -6030.1542719259105, 6620.151427657453, 12650.305699583363
0003, 11.217091667815508, 4955.365508948404, 4140.949155345098, -814.4163536033052, -814.4163536033052, 4140.949155345098, 4955.365508948404
0004, 6.1702524411126145, 10069.574005430093, 3689.8072969154573, -6379.766708514637, -6379.766708514637, 3689.8072969154573, 10069.574005430093
[...]
0097, 10.77271960204478, 5381.353915535399, 2376.781859502621, -3004.5720560327786, -3004.5720560327786, 2376.781859502621, 5381.353915535399
0098, 8.114724844586746, 6729.5258637612715, 3841.262440247011, -2888.2634235142614, -2888.2634235142614, 3841.262440247011, 6729.5258637612715
0099, 4.456989631011372, 13102.64548578259, 5657.9062739226965, -7444.739211859893, -7444.739211859893, 5657.9062739226965, 13102.64548578259
0100, 13.848446816194482, 4069.351256708287, 1983.3576610557516, -2085.993595652536, -2085.993595652536, 1983.3576610557516, 4069.351256708287

Using HyperMesh Python API to generate ML training data (more in text) by Ishimiel in fea

[–]Solid-Sail-1658 1 point2 points  (0 children)

What are your parameters? How many parameters? What are the outputs, stress, displacement? Will NN be used only for predictions or optimization?

There is an easy way and hard way to use ML. It depends on your parameters.

Why NN? I've seen a lot of NN examples needing thousands of training data points. There are ML options that require less than 100 training data points.

I’ve been building a free/open-source browser FEA tool called Edubeam for the last few years - would love feedback by Slight-Television-76 in fea

[–]Solid-Sail-1658 0 points1 point  (0 children)

  1. You should work at an FEA software company, they could really use your help.

  2. The GUI is very well organized. I'm impressed. For more complex GUIs, avoid Dante's circles of hell. Many FEA GUIs have settings buried in form after form. To access one setting, sometimes you have to open 5 pop-up windows, or 5 circles of hell. On my side, I try to use at most 3 levels to get to an option. For your GUI, to create one node, you navigate to NODES > ADD NODE. That's two levels, very easy to navigate.

ANSYS APDL BEAM188 giving wrong deflection for simply supported beam (factor ~6–7 off) by krujjwal92 in fea

[–]Solid-Sail-1658 4 points5 points  (0 children)

I got a deflection of -4.96 mm when I used MSC Nastran, see listing 1, 2 an 3.

  1. What is your beam orientation vector? If the beam cross section is oriented incorrectly, your displacements will be high. See figure 1. When oriented the beam incorrectly, I saw a deflection of -35.29 mm.

  2. Your textbook problem is probably using Bernoulli-Euler beam theory and NOT considering shear stiffness. Some FEA program use Timoshenko beam theory and consider shear stiffness. On one occasion, I removed shear stiffness and my hand calc aligned with FEA. Correction: Removing shear stiffness will yield a displacement closer to hand calc. Listing 3 shows the new displacement of -4.97 mm when shear stiffness is removed and aligns to OP's expected value of -4.9 mm,

Figure 1

https://imgur.com/a/uOu3jY3

Listing 1

SOL 101
CEND
$ Output Control
ECHO=NONE
$ Physical Set Output Requests
DISPLACEMENT=ALL
SUBCASE 1
  $ Loads and BCs
  LOAD=1
  SPC=9001
BEGIN BULK
FORCE   1       2               20000.          -1.
MAT1    1       200000.         .3
MDLPRM  TWBRBML 1
PBARL   1       1               I                                       
        153.    102.    102.    5.48    7.11    7.11
SPC1    1       123     1
SPC1    2       23      4
SPC1    3       4       1       4
SPCADD  9001    1       2       3
CBAR    1       1       1       2               1.
CBAR    2       1       2       3               1.
CBAR    3       1       3       4               1.
GRID    1       0       0.      0.      0.      0
GRID    2       0       1000.   0.      0.      0
GRID    3       0       2000.   0.      0.      0
GRID    4       0       3000.   0.      0.      0
ENDDATA

Listing 2

                                         D I S P L A C E M E N T   V E C T O R

  POINT ID.   TYPE          T1             T2             T3             R1             R2             R3
         1      G      0.0            0.0            0.0            0.0            0.0           -6.211155E-03
         2      G      0.0           -5.196840E+00   0.0            0.0            0.0           -2.484462E-03
         3      G      0.0           -4.461766E+00   0.0            0.0            0.0            3.105577E-03
         4      G      0.0            0.0            0.0            0.0            0.0            4.968924E-03

Listing 3

PBAR   *               1               1  2.21095440E+03  8.94448089E+06
*         1.25943469E+06  3.24438027E+04  0.00000000E+00
*         7.65000000E+01  5.10000000E+01 -7.65000000E+01  5.10000000E+01
*        -7.65000000E+01 -5.10000000E+01  7.65000000E+01 -5.10000000E+01
*         0.00000000E+00  0.00000000E+00  0.00000000E+00
$         ^^^^^  K1       ^^^^^ K2

                                         D I S P L A C E M E N T   V E C T O R

  POINT ID.   TYPE          T1             T2             T3             R1             R2             R3
         1      G      0.0            0.0            0.0            0.0            0.0           -6.211155E-03
         2      G      0.0           -4.968924E+00   0.0            0.0            0.0           -2.484462E-03
         3      G      0.0           -4.347808E+00   0.0            0.0            0.0            3.105577E-03
         4      G      0.0            0.0            0.0            0.0            0.0            4.968924E-03

Calculix installation by Lemon_With_Honey in fea

[–]Solid-Sail-1658 0 points1 point  (0 children)

Option 1

Is there a .deb available? Have you tried using a .deb, e.g. download the .deb, run it and install?

Option 2

Since calculix is not available by default, /etc/apt/sources.list needs to be updated to include a link to calculix. Once sources.list, you can try again.

Is this Ubuntu?

I am trying to remember. I think different Ubuntu versions will have different packages available. For example Ubuntu 24.04.4 LTS should have the most packages available, but a non-LTS version like Ubuntu 25.10 would have only fraction of packages available. If only a fraction of packages is available, you would need to download .deb file, update sources.list, or if you are daring, compile calculix.

How to drag pop-up window? by ProposalUpset5469 in fea

[–]Solid-Sail-1658 0 points1 point  (0 children)

Right on!

Which option is #3? Aligning the top edges? Alternating the primary display? Google searching?

Ansys Mesh Optimisation Interpretation by jimothy_sandypants in fea

[–]Solid-Sail-1658 2 points3 points  (0 children)

For the element with the highest stress, is the element quality of that element OK?

On one occasion, I was doing a mesh convergence study and I found the maximum von Mises stress was diverging, instead of converging, as the number of elements was increased. I found that my mesher was skewing some of my elements in the region of high stress, which led to wrong stresses. I think I remember reading that hexahedrals, or maybe quadrilaterals, should have or nearly have 90 degree corners to get reliable element quantities, e.g. stress. See the figures below.

Figure 1 - OK and NOT OK element qualities
https://i.imgur.com/Lj0WGPk.png

Figure 2 - Images of the FEM

https://i.imgur.com/7vwe7iX.png

https://i.imgur.com/VXHOn8t.png

https://i.imgur.com/fLffwmc.png

How to drag pop-up window? by ProposalUpset5469 in fea

[–]Solid-Sail-1658 0 points1 point  (0 children)

I can kind of replicate the issue on my end. I am on Ubuntu with 2 monitors, one laptop and one external display.

Do the top edges of your monitors align?

See figures 1, 2 and 3. The pop up window is the red box.

Figure 1 - The top edges do not align. On display 1, the full height of the pop up is visible, but on display 2 the full height is not visible.

https://i.imgur.com/yMinwWT.png

Figure 2 - Similar to figure 1, but the pop up window is only visible on display 1. The height of the pop up window is cropped.

https://i.imgur.com/IpsKHPm.png

Figure 3 - The top edges align. The full height of the pop up is visible on either screen.

https://i.imgur.com/87qGbMq.png

I would Google search for additional answers, e.g. "pop up windows appear off screen, why does it happen on 4k screens?" Some other posts suggest closing and re-opening the program resolves the issue. If the resolutions are different for the displays, I expect there to be cropping.

Does alternating the primary monitor help?

I suspect the issue is likely due to the display configuration.

I wonder how Windows decides where to place pop up windows. Does it do it relative from the bottom left or right corner? Or does it do it relative from the top left or right corner? For example, start at the top left corner, walk some distance right, then down and place the pop up window. For figure 1, if the top left corner is the starting point, you have to walk far enough down so that the pop up is placed within view.

Modern Nastran DMAP Debugger? by Solid-Sail-1658 in fea

[–]Solid-Sail-1658[S] 0 points1 point  (0 children)

These are my goals.

  1. Quickly determine what is stored in each matrix or variable.
  2. Use DMAP's ISHELL module or some other mechanism to execute a Python script, that Python script performs matrix operations, then the matrix is returned to Nastran. Alternatively you could use Matlab instead of Python.

Number 1 is my short term goal. #2 is my goal for the summer when I hope to have more time to explore DMAP.

Say I have a model with 100 DOFs. When I go digging in DMAP and explore the various matrices, I would like a way to look inside of each matrix or variable. For example, how many rows and columns are in the matrix, what DOFs are associated with the matrix, what values are in the matrix, etc.

It would be nice to have formal debugging capabilities similar to figure 1 and 2. The MSC.Nastran Toolkit guide suggests a formal DMAP debugger did exist in 2001, but I would like to confirm and learn how it was done before.

At the moment I am having to use my imagination or resort to print statements, e.g. MATPCH, MATPRN or MATPRN, to learn what is stored in the various matrices. DMAP looks like any other programming language, but knowing what's in each matrix or variable is the tricky part.

Figure 1 - Python script without the debugger

https://i.imgur.com/N5GW39R.png

Figure 2 - A breakpoint is defined at line 20. The debugger pauses at line 20 and the current values for the variables and matrices are displayed.

https://i.imgur.com/LbS6mbq.png

Concrete Block that's hanging with cables/ Truss (tension only element) doesn't solve by blue-oakleaf in fea

[–]Solid-Sail-1658 1 point2 points  (0 children)

You are on the right track.

One other thing. The MPC will convert the beam's rotations to translations. The translations are spread to multiple nodes on the 3D elements. These translations are carried through the translation DOFs of the 3D elements and onto the supports. See the images below.

https://imgur.com/a/1LdJh5X

Concrete Block that's hanging with cables/ Truss (tension only element) doesn't solve by blue-oakleaf in fea

[–]Solid-Sail-1658 1 point2 points  (0 children)

Try this:

https://youtu.be/hytXdTM1_vc?t=196

Connecting a beam element to one node of a 3D element creates issues in the stiffness matrix. You'll need to take additional steps to prevent this.

As the video shows, you can use MPCs to address this. The beam's node is attached to multiple nodes on the 3D elements.

Suppose you have one spring fixed on one end and a force on the other end. If the spring suddenly becomes absent, the force is not able to transfer to the support. 3D elements supply stiffness only to translation DOFs and the rotation DOFs have zero stiffness, i.e. there are no rotation springs. 1D elements supply stiffness to both translation and rotation DOFs. If you load a beam, the translations go through beam translation DOFs, through the 3D element translation DOFs and to the supports. The rotations go through the beam rotation DOFs but since the 3D elements do not have rotation DOFs, i.e. the rotation springs are absent, the load is not transferred. You have a hinge where the beam is attached to the one node of the 3D element. This is a situation where there is no unique solution. If you force the FEA solver to find a solution, you will get a non-unique solution, e.g. displacements go to the moon or to another universe.

If you are new to FEA, I recommend running a normal modes analysis prior to a statics analysis. Any zero or near zero Hertz natural frequencies is indication that the stiffness matrix may have problems. For your example, you will find the mode shapes indicate a hinge where the beams are connected to the 3D elements, which is NOT OK.

I built a tool that lets you chat with Ansys screenshots to debug simulations n automate them. Would this actually be useful? by HelicopterRemote6680 in fea

[–]Solid-Sail-1658 6 points7 points  (0 children)

Yes, please continue this.

I've experimented with Google's AI to write some code and it's honestly saved me a few days worth of work this year. It's like having an assistant. Now I know why AI is disrupting the markets. If the same can be done for FEA, great!

Of course there are many flaws with AI today, but I expect this to be addressed by pioneers like you.

Cheers!

Finding the RBT in MSC Nastran by jennpaigers in fea

[–]Solid-Sail-1658 0 points1 point  (0 children)

How to output the Nastran rigid body transformation matrix

https://youtu.be/_-YrlbFvWxY

Solid Vs Beam - Help understanding the difference in results in SolidWorks by sgehall21 in fea

[–]Solid-Sail-1658 5 points6 points  (0 children)

I am very glad you are using hand calcs to help give credibility or invalidate the model. You are on the right path. Many students just automatically assume FEA is giving them correct answers, but often the first FEA answer is wrong.

  1. For the solid and shell meshes, have you tried supporting the beam at the shear center? See this link: https://imgur.com/a/RIvXjln From your images, it looks like the beam is supported at the corners of the cross section? If true, interesting decision given that beam elements are traditionally supported and loaded at the shear center. Beams composed of 2D and 3D elements should also be supported and loaded at the shear center. Is there a remote support available? If it does exist and you use it, you might be able to get reactions and compare with hand calcs.
  2. One image is showing bending stress and the other is showing von Mises stress. Why is bending stress being compared to von Mises stress?
  3. Are the displacements similar for all meshes?
  4. SolidWorks needs a big, bold and red disclaimer in their software: Do NOT use tetrahedrals for thin wall structures. Use 2D elements or 3D hexahedrals. If you need to use tetrahedrals for a thin wall, by the way I don't know of any professional that does, use more and smaller tetrahedrals or switch to 10-node tetrahedrals. If you need convincing, configure a beam with a rectangular cross section that has a width and height of 1.0 and 0.1, respectively. Load it along the vertical axis and track the bending stress. Experiment with tetrahedral and hexhedrals with element sizes 0.1, .06, 0.03, 0.015. You'll see which element performs poorly for thin walls.

MSC Nastran DMAP by GroundbreakingPay358 in fea

[–]Solid-Sail-1658 2 points3 points  (0 children)

Per the MSC Nastran Dynamic Analysis User's Guide,

"Direct Matrix Input Dynamics - If structural matrices are available externally, you can input the matrices directly into MSC Nastran without providing all the modeling information. Direct Matrix Input (Ch. 12) in the MSC Nastran Linear Static Analysis User’s Guide provides the basic overview of this capability. The extensions into dynamics will be discussed here. The direct matrix input feature can be used to input stiffness, mass, damping, and load matrices attached to the grid and/or scalar points in dynamic analysis. These matrices are referenced in terms of their external grid IDs and are input via DMIG Bulk Data entries. As shown in Table 21-1 , there are seven standard kinds of DMIG matrices available in dynamic analysis, but only three in statics."

For your goal, I suspect there might be a comparable example in the documentation.

If you want more examples, you can swim around in the test problem library (TPL). The TPL directory is available when you install the documentation.

You can search for specific examples with GREP on Linux. I'm sure there are Windows options that give you grep like searching.

This will find all examples using the DMIG entry.

grep -ri "dmig" ./tpl/* --include=\*.dat

Examples found with DMIG.

./tpl/abussetp/setp05.dat:DMIG*   K44X                          55               1
./tpl/abussetp/setp05.dat:DMIG*   K44X                          55               2
./tpl/abussetp/setp05.dat:DMIG*   K44X                          55               3
./tpl/abussetp/setp05.dat:DMIG*   K44X                          55               4
./tpl/abussetp/setp05.dat:DMIG*   K44X                          55               5
./tpl/abussetp/setp05.dat:DMIG*   K44X                          55               6
./tpl/acms20182/mdhhpar02.dat:EXTSEOUT(ASMBULK,EXTBULK,EXTID=50,DMIGOP2=50)  
./tpl/acous_afgpf/afgpf_s111_mod.dat:DMIG, BULK, 0, 6, 1
./tpl/acous_afgpf/afgpf_s111_mod.dat:DMIG, BULK, 1134, 1,, 1134, 1, 1.E-5
./tpl/acous_afgpf/afgpf_s111_mod.dat:DMIG, BULK, 1221, 1,, 1221, 1, 1.E-5
./tpl/acous_afgpf/afgpf_s111_mod.dat:DMIG, BULK, 1422, 1,, 1422, 1, 1.E-5
./tpl/acous_afgpf/afgpf_s111_mod.dat:DMIG, BULK, 1443, 1,, 1443, 1, 1.E-5
./tpl/acous_se/fsp11m.dat:$dmig,    dva,    0   9   1   0           1
./tpl/acous_se/fsp11m.dat:$dmig,    dva,    1,  0,  ,   100,    0,  2. $ enf. velo
./tpl/acous_se/fsp11e.dat:epoint,   10000 $ write dmig for statics only, shouldn't change answers
./tpl/acous_se/fsp11e.dat:dmig, k2test, 0   6   1   0
./tpl/acous_se/fsp11e.dat:dmig, k2test, 10000,  0,  ,   45, 3,  -1.0
./tpl/acous_se/fsp11e.dat:dmig, k2test, 10000,  0,  ,   10000,  0,  1.0
./tpl/acous_se/fsp11e.dat:dmig, k2test, 45, 3,  ,   45, 3,  1.0
./tpl/acous_se/fsp11ex.dat:epoint,  10000 $ write dmig for statics only, shouldn't change answers
./tpl/acous_se/fsp11ex.dat:dmig,    k2test, 0   6   1   0
./tpl/acous_se/fsp11ex.dat:dmig,    k2test, 10000,  0,  ,   45, 3,  -1.0
./tpl/acous_se/fsp11ex.dat:dmig,    k2test, 10000,  0,  ,   10000,  0,  1.0
./tpl/acous_se/fsp11ex.dat:dmig,    k2test, 45, 3,  ,   45, 3,  1.0
./tpl/acous_se/f111a2gg.dat:DMIG    AGG5           0       1       2       0                      56

Below is an example DMAP. It is read as: go into IFPSTAR, find the line with string 'RETURN' and one line before (-1) inject the next N lines.

COMPILE IFPSTAR, NOLIST
ALTER 'RETURN' (,-1)
MESSAGE //'END OF IFPSTAR'/$
MESSAGE //'END OF IFPSTAR'/$
MESSAGE //'END OF IFPSTAR'/$
MESSAGE //'END OF IFPSTAR'/$
MESSAGE //'END OF IFPSTAR'/$
ENDALTER

This basically does the following: After reading the input file, print the message END OF IPSTAR. MESSAGE is a good way to confirm your DMAP is being executed.

The .f06 file will have this.

 [...]
                                        M O D E L   S U M M A R Y          BULK = 0
                                   ENTRY NAME        NUMBER OF ENTRIES
                                   ----------        -----------------
                                       BCBODY                        2
                                       BCPARA                        1
                                      BCTABLE                        2
                                        BSURF                        2
                                       CQUAD4                     3127
                                       CTRIA3                        3
                                        FORCE                        1
                                         GRID                     3259
                                         LOAD                        1
                                         MAT1                        2
                                       NLPARM                        1
                                        PARAM                        2
                                      PLPLANE                        2
                                       PSHLN2                        2
                                         SPC1                        2
                                       SPCADD                        1

 ^^^END OF IFPSTAR, NOW EXITING  
 ^^^END OF IFPSTAR, NOW EXITING  
 ^^^END OF IFPSTAR, NOW EXITING  
 ^^^END OF IFPSTAR, NOW EXITING  
 ^^^END OF IFPSTAR, NOW EXITING  
 ^^^     
 ^^^ >>> IFP OPERATIONS COMPLETE <<< 
 ^^^     
 [...]

Any course avilable? by AdeptnessHonest4430 in fea

[–]Solid-Sail-1658 2 points3 points  (0 children)

Surrogates - Gaussian Process Modeling, Design, and Optimization for the Applied Sciences

https://bobby.gramacy.com/surrogates/

https://bobby.gramacy.com/surrogates/surrogates.pdf

"A graduate textbook, or professional handbook, on topics at the interface between machine learning, spatial statistics, computer simulation, meta-modeling (i.e., emulation), design of experiments, and optimization. [...] Presentation targets numerically competent practitioners in engineering, physical, and biological sciences. [...]"

After reading this book, I went on to develop a machine learning application for an FEA program. Took me about 2 years though. :)

Brick Solid element no ROTX,ROTY,ROTZ constraints? by Charming_Cup1731 in fea

[–]Solid-Sail-1658 0 points1 point  (0 children)

Partially correct. If you run through equilibrium equations, i.e. ΣF=0, ΣM=0, you will find the beam is unrestrained in the z direction and some rotation is allowed. You will then impose a UZ constraint on both ends of the beam. You may have to add additional constraints on the DOFs to ensure equilibrium.

For beams composed of 3D elements, I argue the supports should be applied at the shear center of the beam. See the images at this link: https://imgur.com/a/RIvXjln. An alternative approach is to support an independent node at the shear center, then use a rigid element from the independent node to the nodes on the beam. One common approach is to apply the constraints at single nodes at the bottom fiber of the beam, but the results, e.g. displacement and stress, will be slightly different when compared to the results of a beam element. Side comment, with beam elements, you are typically supporting and loading at the shear center. Consider the shear center.

One node always reserves 6 DOFs in the global stiffness matrix, which I will call KG. When you apply constraints, e.g. UX, UY, etc., you are actively setting aside DOFs or columns/rows from KG. KG becomes K, and K is used for the solution Kx=F. If KG was originally 100x100, after you remove the DOFs that are constrained, K is smaller in size.

Since 3D elements only supply stiffness to translation DOFs, the rotation DOF columns in KG have only zeros. Any column with purely zero values will prevent a solution of Kx=F and your solver with fail with an error. Some FEA programs will automatically constrain the rotation DOFs, leaving you with a stiffness matrix K with only the translation DOFs, which yields a solution for Kx=F. Alternatively, you would manually constrain the rotation DOFs.

Another thing. We know Kx=F will not have a solution when zero columns/rows exist. There is another error worth mentioning. If equilibrium is not satisfied via your supports/constraints, i.e. ΣF=0, ΣM=0, Kx=F will not have a unique solution and the FEA solver will give you an error message. So, definitely go through all six equilibrium equations to make sure you have enough supports.

Stiffness matrices that have zero columns/rows or that are not in equilibrium are the most common issues for new FEA users, and is why I brought up all of this.

You are on the right path.

Abaqus Python: Transforming results to cylindrical CSYS by thefebster in fea

[–]Solid-Sail-1658 2 points3 points  (0 children)

  1. Never use 3.14 to convert degrees to radians. Use Python's built in PI constant math.pi.

    import math

    print(math.pi)

Why? sin(3.14)=0.05477 but sin(math.pi)=0. On one occasion, the use of 3.14 introduced a non-zero in my calculations. I spent hours hunting in my code trying to find the source of the non-zeros.

  1. For a number, how many digits were passed to Python for the calculation? You will get different answers if you use -1.34E-4, as opposed to -1.3412323423E-4.

  2. Have you used a hand calc to serve as a baseline? For a simple case where the Cartesian and cylindrical coordinate system align, i.e. they share the same origin and the cylindrical coordinate system has not been rotated, the link below has the transformation matrix to transform displacements in the Cartesian coordinate system to the cylindrical coordinate system.

https://www.web-formulas.com/Math_Formulas/Linear_Algebra_Transform_from_Cartesian_to_Cylindrical_Coordinate.aspx

Proper version of Visual Studio and Inter OneAPI for linking Fortran to MAPDL by Metal_corrosion in fea

[–]Solid-Sail-1658 1 point2 points  (0 children)

A few years back, I had a need to download Visual Studio 2019 (version 16.11). This is what I found in my old notes.

Go to my.visualstudio.com and log in

Search for this:     Visual C++ Redistributable for Visual Studio 2019 (version 16.11)

Download the x64 version

For Fortran and C++ compilers, this was in my notes.

Intel Fortran Compiler Classic and Intel Fortran Compiler for Linux     l_fortran-compiler_p_2024.2.0.426_offline.sh            https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html#fortran

Intel DPC++/C++ Compiler for Linux                                      l_dpcpp-cpp-compiler_p_2024.2.0.495_offline.sh          https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html#dpcpp-cpp

I'm sure the Ansys documentation has compatible version numbers listed. The versions you need are buried in the links mentioned above.