Author Topic: how to calculate the kinetic energy  (Read 11248 times)

carlygao

  • Jr. Member
  • **
  • Posts: 37
how to calculate the kinetic energy
« on: May 10, 2016, 10:37:39 PM »
How to calculate the kinetic energy along the time history? Is there an existing file in FEAP which calculates the kinetic energy? Is there a simple example to verify the implementation? Thanks.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: how to calculate the kinetic energy
« Reply #1 on: May 11, 2016, 08:35:03 AM »
In ver8.4 there should be a subroutine that computes momenta and energy in the directory ./elements/solid3d

the routine is called pengy3d.f

Look for kinetic energy,  for the TPLOt outputs the energy is placed in the array position epl(7) and passed back in the common block with an include: ptdat6.h


carlygao

  • Jr. Member
  • **
  • Posts: 37
Re: how to calculate the kinetic energy
« Reply #2 on: May 12, 2016, 09:10:56 AM »
Thanks, Prof. Taylor. I am wondering where I can get FEAP ver8.4? I saw ver 3.1 on the website, and I am using ver 8.3.

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: how to calculate the kinetic energy
« Reply #3 on: May 12, 2016, 09:59:34 AM »
Please send an email to feap@berkeley.edu for further information on getting a version 8.4 license.

carlygao

  • Jr. Member
  • **
  • Posts: 37
Re: how to calculate the kinetic energy
« Reply #4 on: May 12, 2016, 10:15:27 PM »
I still have another question about the strain energy. I used the attached files to verify the strain energy. The force should be constant, 10N. I don't understand why the F*d is as twice as the one reported in the energy file. Thanks.

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: how to calculate the kinetic energy
« Reply #5 on: May 13, 2016, 01:43:05 AM »
Isn't Work = integral_0^d F(x) dx == (1/2) F*d in the linear case?

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: how to calculate the kinetic energy
« Reply #6 on: May 13, 2016, 06:44:08 AM »
Ver 8.3 should compute the energy in each element under isw.eq.13

Ver 3.1 is FEAPpv and only the fld2d1 routine in the solid2d.f file compute energies, also for isw.eq.13

carlygao

  • Jr. Member
  • **
  • Posts: 37
Re: how to calculate the kinetic energy
« Reply #7 on: June 06, 2016, 04:14:38 PM »
Prof. Taylor, for the kinetic energy calculation in sengy.f in the solid2d folder, ul(ndf,nel,4) was used. I guess this variable is the velocity for each Gaussian point. However, I don't where it was calculated. I need to calculate it in my user element. So I am wondering in which file I can find it. Thanks.

in the sengy.f file:

      vsqr = 0.0d0
      do i = 1,is
        vl = 0.0d0
        do j = 1,nel
          vl = vl + ul(i,j,4)*shp(ns,j)
        end do ! j
        vsqr = vsqr + vl*vl
        vl   = vl*cfac*dmas                  ! Set consistent mass part
        do j = 1,nel
          mom(i,j) = mom(i,j) + shp(ns,j)*vl
        end do ! j
      end do ! i

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: how to calculate the kinetic energy
« Reply #8 on: June 07, 2016, 08:10:21 AM »
If you are computing in an element the values of ul(*,*,*) are already set before an element is called.

If you are doing it somewhere else then you do need to set the values.  The values in the "ul" array are set in plocal from values stored in the u(ndf,numnp,1) (displacements at current time) and ud(ndf,numnp,*) arrays.  The setting of the velocity does depend on the time integration routine you are useing but generally, ud(ndf,numnp,1) should have the current velocity.

carlygao

  • Jr. Member
  • **
  • Posts: 37
Re: how to calculate the kinetic energy
« Reply #9 on: September 01, 2016, 09:09:53 AM »
Hi Prof. Taylor, I am using the user elastic element to run the seismic loading. Comparing the results using solid element from FEAP, I have to add lumped mass in the input file using my user elastic element. However, using FEAP solid element, I don't need to add lumped mass, only using "mass, tang" in the batch. The difference between the FEAP solid element results and my user elastic element results is small. I still want to confirm whether my way to use user elastic element is right or wrong. If I don't add lumped mass for the user element, and only do as using FEAP solid element, the results from the user elastic element are too large to be right. Thanks.

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: how to calculate the kinetic energy
« Reply #10 on: September 01, 2016, 03:19:07 PM »
With FEAP's builit-in elements you can issue the Macro command mass,lump to have them use lumped mass instead of consistent mass.  you can use this feature to compare to your lumped mass user element.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: how to calculate the kinetic energy
« Reply #11 on: September 02, 2016, 06:29:24 AM »
How are you performing the analysis?  If it is a modal analysis then you need to precompute bothe the mass (either consistent of lumped) and the tangent before computing the eigensolution.  If you are doing a time integration method (e.g., Newmark) then feap forms a solution matrix that includes both the stiffness and mass effects without need to form a separate MASS term.  The user and programmer manuals should describe how the K*c1 + C*c2 + M*c3 matrix is formed and used.

carlygao

  • Jr. Member
  • **
  • Posts: 37
Re: how to calculate the kinetic energy
« Reply #12 on: September 06, 2016, 05:45:27 PM »
Hi Prof. Taylor, I used the time integration method. For the static problem, both my user element and the FEAP solid element gave me the same results, so I assumed K are the same between them. I checked the damping coefficients, and they are zero, so no damping for both cases. The only difference should be from M. If I used consistent mass and "mass, tang" in the batch part, at only one time step, their result difference is huge for displacement at the loading point. The result from user element is 10^10 larger than the one from the FEAP solid element. However, if I inserted nodal mass for the user element, but consistent mass for the FEAP solid element, and used "mass, tang" in the batch part, their results are pretty close. I will used the lumped mass instead of consistent mass in the FEAP solid element as you suggested to test what will happen. Thanks.

carlygao

  • Jr. Member
  • **
  • Posts: 37
Re: how to calculate the kinetic energy
« Reply #13 on: October 06, 2016, 10:31:10 AM »
Hi Prof. Taylor, here is the some info about a testing case:

1. adding lumped masses will only change the diagonal mass value in the mass matrix.
2. if both of them use lumped masses, or don’t use lumped masses, the mass matrix are consistent between them. But the tangent matrix is different.
3. the maximum vertical displacement after 1 step of transient simulation of one simple testing case is summarized as follows for each situation.


                        
                                   solid                  user element      different place
both with lumped mass     9.5763e-13                 4.05e-13         tangent matrix are different, but the values have the same order

both without lumped mass     1.35e-12            1.25e-2        tangent matrix have a huge difference

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: how to calculate the kinetic energy
« Reply #14 on: October 07, 2016, 07:56:41 AM »
I do not understand the problem you are solving and what the various comments refer to. Can you post the problem you are solving and what the various differences are relating to.