Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set the wind angle in FAST v7 #2596

Open
Xiexianping99 opened this issue Jan 3, 2025 · 15 comments
Open

How to set the wind angle in FAST v7 #2596

Xiexianping99 opened this issue Jan 3, 2025 · 15 comments

Comments

@Xiexianping99
Copy link

I am using fast 7 for wind turbine simulation calculation. I want to explore the influence of different wind direction on single pile turbine , but I do not know how to set the wind Angle.

@jjonkman
Copy link
Collaborator

jjonkman commented Jan 3, 2025

Dear @Xiexianping99,

In FAST v7, there is no equivalent to input PropagationDir that exists in the InflowWind module of OpenFAST that allows the user to specify the wind direction different from zero. If you are using uniform wind in FAST v7, you can set the wind direction in the uniform wind data file. However, the wind direction cannot be set within a turbulent wind data file.

I'm not sure why you are using such an old version of the software, but I would suggest upgrading to OpenFAST unless you have a strong reason to use the old version. NREL has no plans to make changes in support of FAST v7.

Best regards,

@Xiexianping99
Copy link
Author

Dear Sir

Hello, I'm using the Fastv7 version and want to simulate the failure of the tower and update the tower stiffness matrix in real time. Currently, in the  coeff  subroutine, I've set up two sets of stiffness matrices. One set is  KTFA,KTSS , and the other is the matrix after the tower yields,  KTFA_Yield  and  KTSS_Yield . I add a reduction factor in front of the initial stiffness matrix to simulate the stiffness matrix after the tower yields. In the program, I use stress discrimination to decide which set of matrices to use. I have a questions to consult you.
First, I calculate the stress magnitude of the tower - node in the RTHS sub - routine. Second, I want to use stress - magnitude discrimination to update the tower - stiffness matrix and have written a sub - routine named  updatestiffnessmatrices  to determine which set of matrices to use. At this point, do I need to modify the large - scale time - loop sub - routine  TimeMarch  or the main program?The following is my  updatestiffnessmatrices  code.

SUBROUTINE UpdateStiffnessMatrices()

USE SimCont
USE Tower
USE TowerStressCalculator, ONLY : NodeMises, YdStress,UltimateStress
USE Modes
USE Constants
USE MassInert
IMPLICIT NONE

INTEGER(4) :: I, J, L

REAL(ReKi) :: MaxStress
REAL(ReKi) :: StressFactor

LOGICAL :: Yielded

Yielded = .FALSE.

MaxStress = 0.0

DO J = 1, TwrNodes

IF (NodeMises(J) > MaxStress) THEN

    MaxStress = NodeMises(J)
	
END IF

END DO

IF (MaxStress < YdStress) THEN

StressFactor = 0.0

ELSE IF (MaxStress >= UltimateStress) THEN

StressFactor = 1.0

ELSE

StressFactor = MIN(1.0, (MaxStress - YdStress) / (UltimateStress - YdStress))

END IF

IF (StressFactor == 0.0) THEN

KTFA_Current = KTFA_Initial
KTSS_Current = KTSS_Initial

ELSEIF (StressFactor == 1.0) THEN

KTFA_Current = KTFA_Yield
KTSS_Current = KTSS_Yield

ELSE

KTFA_Current = (1.0 - StressFactor) * KTFA_Initial + StressFactor * KTFA_Yield
KTSS_Current = (1.0 - StressFactor) * KTSS_Initial + StressFactor * KTSS_Yield

END IF

! Update tower frequencies
DO I = 1, 2
FreqTFA(I,1) = Inv2Pi * SQRT(KTFA_Current(I,I) / (MTFA(I,I) - TwrTpMass))
FreqTFA(I,2) = Inv2Pi * SQRT((KTFA_Current(I,I) + KTFAGrav(I,I)) / MTFA(I,I))
FreqTSS(I,1) = Inv2Pi * SQRT(KTSS_Current(I,I) / (MTSS(I,I) - TwrTpMass))
FreqTSS(I,2) = Inv2Pi * SQRT((KTSS_Current(I,I) + KTSSGrav(I,I)) / MTSS(I,I))
ENDDO

! ! Update damping matrix
DO I = 1, 2
DO L = 1, 2
CTFA(I,L) = (0.01 * TwrFADmp(L)) * KTFA_Current(I,L) / (Pi * FreqTFA(L,1))
CTSS(I,L) = (0.01 * TwrSSDmp(L)) * KTSS_Current(I,L) / (Pi * FreqTSS(L,1))
ENDDO
ENDDO

RETURN
END SUBROUTINE UpdateStiffnessMatrices

@jjonkman
Copy link
Collaborator

Dear @Xiexianping99,

I'm not sure I understand your question because SUBROUTINE TimeMarch is called by PROGRAM FAST in FAST v7.

Regardless, the biggest problem I see with your approach is that while you changing the generalized stiffness of the tower with yield, you are not changing the tower mode shapes, which I would expect would change a lot when yield is reached. That said, it would be difficult in ElastoDyn to change the mode shapes over time.

Best regards,

@Xiexianping99
Copy link
Author

Dear

Thank you for your answer. I've noticed the issue with the tower's modal shape. Since it is externally read, it's difficult for me to update it in real time. Is there a rough way to simulate the plastic deformation of the tower material or change the tower's modal shape? Currently, using the method I mentioned above, the elastic response of the displacement at the top of the tower is greater than the plastic deformation, which obviously violates the laws of physics.

Best regards,

@jjonkman
Copy link
Collaborator

Dear @Xiexianping99,

Given that ElastoDyn relies on the mode shapes as shape functions, it is not really possible to update these within a given simulation. Could you run separate simulations with different stiffness and mode shapes, based on the yield for that particular simulation?

Best regards,

@Xiexianping99
Copy link
Author

Dear

Running separate simulations is feasible. But how can I obtain the tower files, stiffness, and modal shape functions for a specific region?

Dear

@jjonkman
Copy link
Collaborator

Dear @Xiexianping99,

It sounds like you already have a way to estimate stiffness in yield based on the local stress. For a given simulation, I would apply this calculation locally at cross sections of the tower, then update the tower mode shapes accordingly, and then run the simulation. This would probably require a two-step process or iteration where you first determine the stiffness change based on the loading, and then you rerun that simulation with that correct stiffness.

Best regards,

@Xiexianping99
Copy link
Author

Dear

How can this be achieved, that is, estimating the stiffness based on the local stress? Currently, I am calculating the stress at each analysis node of the tower in the program. Based on these stresses, how can I estimate the stiffness of the nodes?I'm still a bit confused.

@jjonkman
Copy link
Collaborator

Dear @Xiexianping99,

I gathered from your earlier post that you had a way to change the stiffness based on stress. I have not actually done that myself.

FYI: We discussed a very similar topic on our forum: https://forums.nrel.gov/t/making-fault/1260.

Best regards,

@Xiexianping99
Copy link
Author

Dear Sir

I learned from this forum that if it is difficult to change the mode shape function during the simulation process, one working condition can be decomposed into two working conditions. The end of the first working condition can be used as the initial condition of the second working condition. At this time, do I need to re-input the modal coefficients of the tower? How should I calculate these new coefficients?

Best regards

@jjonkman
Copy link
Collaborator

Dear @Xiexianping99,

You should recompute the tower mode shapes anytime the mass distribution, stiffness distribution, geometry, top-top or tower-base boundary conditions change. As also discussed on our forum, you can use pre-processors such as BModes or pyFrame3DD to compute the tower mode shapes.

Best regards,

@Xiexianping99
Copy link
Author

Dear Sir

Thank you. I understand that BModes can calculate the mode shapes of the tower, but before the calculation, it requires manual input of the stiffness, mass, etc. of the tower. However, I have a question. These parameters are obviously different from the working conditions of my first calculation. How to calculate these parameters is my biggest confusion at present? You mentioned estimating the stiffness with stress. For example, if I know the stress magnitude of a node, can I obtain the stiffness by dividing the stress by the elastic modulus? (This elastic modulus is not the true modulus of the steel, but a smaller modulus.)

Best regards

@jjonkman
Copy link
Collaborator

Again, I have not actually developed a way to compute stiffness from stress, but I assumed you had a way of doing that. I imagine this would involve replacing the elastic modulus--which is only valid before yield, with something else--in the cross-sectional analysis to compute stiffness.

@Xiexianping99
Copy link
Author

Dear Sir

I encountered the following error when compiling and running the program. What could be the cause of this?
image

Best regards

@jjonkman
Copy link
Collaborator

Dear @Xiexianping99,

What is S2FAST.x64+.exe; is this a Windows executable of FAST v7 you compiled yourself?

Best regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants