Hello everyone,
I am working calculating the tip displacement of a wire when there is load on the right tip.
I am using the code of Time-integration of elastodynamics equation(https://comet-fenics.readthedocs.io/en/latest/demo/elastodynamics/demo_elastodynamics.py.html)for reference.
For my Bachelor thesis, I want to measure the deflection deformation of a wire cantilever caused by gravity from a gravity source and detect the gravity from the displacement.
Using the reference code above, I changed the bar to a wire, and added damping parameters.
What I want to do is add seismic noise as an expression. I have data that I got from a seismic accelerometer(actual time sequence). I want to apply this data to an expression using a csv file of the seismic noise(time and acceleration).
I tried writing a C++ code and defining a UserExpression but the code does not run.
# Time-stepping parameters
T = 4.0
Nsteps = 50
dt = Constant(T/Nsteps)
p0 = 1.
cutoff_Tc = T/5
# Define the loading as an expression depending on t
p = Expression(("0", "t <= tc ? p0*t/tc : 0", "0"), t=0, tc=cutoff_Tc, p0=p0, degree=0)
For the Time-stepping parameters I changed the numbers to the actual time length and data points from my measurements.
Can anyone help me solve this problem?
(I am sorry that my English is poor)