Skip to content
Discussion options

You must be logged in to vote

SU2 reports normal sensitivity as any tangential component would just mean a reparameterization and does not change the shape.

The simplest way therefore is to compute normal vectors for the points on the surface and then multiply the surface sensitivity with these. A simple code snippet is attached below for reference:

def compute_area(X):
    # Shoelace formula - works for any simple polygon (piecewise-linear simple closed curve)
    area = np.sum(X[:-1, 0] * X[1:, 1] - X[1:, 0] * X[:-1, 1])

    return area.item()


def compute_normals(X):
    # Panel vectors - these are tangents between consecutive points on the shape
    dX = X[1:] - X[:-1]
    dx = dX[:, 0]
    dy = dX[:, 1]

    # …

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@atharvaaalok
Comment options

@pcarruscag
Comment options

@bigfooted
Comment options

@atharvaaalok
Comment options

@atharvaaalok
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by atharvaaalok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants