chenjinghao 发表于 2009-12-16 11:15:55

求助有限元FORTRAN编程

本帖最后由 chenjinghao 于 2010-1-26 15:20 编辑

本人在用FORTRAN编写一个管道提升的有限元程序,现遇到一些问题请教各位大虾:
我是在王瑁成《有限单元法基本原理和数值方法》杆系的源程序上进行修改。
计算出轴力是对的,弯矩在大小和最大值的位置上都不对。
管道形态图在9#
请教各位大虾问题出在哪里。
小弟不胜感激!

caoer 发表于 2009-12-16 15:40:27

没用过这个程序,至于moment, 先算简单算例,然后对比电脑运算与手工计算结果,如果大体趋势是对的,那么证明基本程序没错。造成这种fluctuation可能是单元数目不够,积分点过少,尝试修改这两项。也可将计算结果对比一些商用有限元计算结果,如ansys

chenjinghao 发表于 2009-12-16 16:10:24

2# caoer
很感谢您的回复
我已经拿框架的标准算例验证过,没有问题。
关于网格划分,这个是划了170个单元,单元划分的不同得到的趋势也不太一样,划分的多了反而锯齿更多。

tonnyw 发表于 2010-1-3 12:59:34

3# chenjinghao

I guess you are talking about beam element since you mentioned moment.

What I am thinking is the following:
1. I don't think this has something to do with integration since element stiffness matrix has explicit form and no numerical integration needed.
2. I almost think this has something to do with either precision definition or initialization. Maybe for current element you use single precision and for the next you use double precision. Or you forgot to initialize some arrays.
3. Set up a simple model such as a cantilever beam subject to transverse load at the free end. You know the exact moment for each element and compare it with your finite element solution. Note that the difference should be within something like 1e-9 or 1e-10. Also increase the number of elements to see if you still have jig-saw plot.

chenjinghao 发表于 2010-1-21 15:50:46

RE: 求助有限元FORTRAN编程

4# tonnyw
根据你的建议我采用双精度,并用均布载荷的悬臂梁调试,弯矩是连续的,而且值都对。立管提升的计算弯矩也是连续的,但是弯矩的最大值在中间,弯矩最大值应该靠左边。感谢您的建议。

hao1231987 发表于 2010-1-22 08:42:36

qqqqqqqqqqqqqqqqq

tonnyw 发表于 2010-1-24 11:00:47

5# chenjinghao

Let's worry about the moment later. First let's get the displacement correct.

For a cantilever beam subject to uniform transverse load, finite element solution should be exact at the nodal points. So first plot the displacements to see if finite element solution is okay. Then we worry about the moment later.

chenjinghao 发表于 2010-1-25 14:26:40

7# tonnyw
您好,我计算了一下位移,位移变形存在问题。最终的计算结果拉力没问题,弯矩在数值上和最大值及其位置上都存在错误,请问这是什么原因?感谢您的知道

chenjinghao 发表于 2010-1-26 15:08:23

7# tonnyw
图中红色的线是变形后的管道形态,用ABAQUS算出来的是整体下移,不知道是我哪里错了,请各位大虾指教

tonnyw 发表于 2010-1-26 16:40:24

9# chenjinghao

Why not do what I suggested? Take a simple cantilever beam and check the following:
1. Local element stiffness matrix and element load vector
2. Transformation matrix
3. Global stiffness matrix and load vector.

For a single element, you have analytical form for each of the above. Then you know what might be the problem. Otherwise, we're like blind men trying to figure out how the elephant looks like.

wertyu 发表于 2010-1-27 11:14:42

没用过这个程序。。。。。。。。。。。。。。。

chenjinghao 发表于 2010-1-27 14:46:08

10# tonnyw
       我拿悬臂梁做了一下计算,并和手算做对比,您说的那三点都没有问题,最终的位移和节点力都没有错误。
       因为我这个问题管道提升,他的每一个单元坐标变换矩阵都不一样,我划分网格采用等长度划分的。
       关于等效节点力,我们用的是这种,把他转化成沿着轴向和垂直轴向两种,进行力得叠加。不知道这块是不是存在问题。

tonnyw 发表于 2010-1-28 10:02:41

Now let the cantilever beam have angle with respect to the global
coordinates X-Y-Z. This is to make sure your transformation matrix
is correct.
Most likely when you test your code you make the cantilever beam
parallel to the global coordinates, which cannot tell you too much.

chenjinghao 发表于 2010-1-28 10:49:46

13# tonnyw
很感谢您的指导,在有限元编程这条路上我还是一个新手,一直比较迷茫,您的很多建议让我少走了很多弯路,不过我做到这一步我感觉有一种做不下去的感觉,弯矩这块一直都没调出来。您在做有限元编程上有什么建议,把您的经验传授一下。在仿真论坛上看到过一个贴子,有限元编程确实是一条漫长的道路!

tonnyw 发表于 2010-1-28 12:15:50

14# chenjinghao

I don't think this is about programming. It is about whether you understand the theory.
Always start with simple problem and take one step at a time before attacking the real problem.

chenjinghao 发表于 2010-1-28 13:49:27

15# tonnyw
理论是基础,编程是手段,我的专业不是力学,只学过工程力学,在有限元的学习上总是感觉不扎实。像您这样功底深厚的人拿过来这样一个问题的时候知道它应该怎么做,或者知道可能的问题出在哪,我们这样的初学者很需要你们的帮助啊

chenjinghao 发表于 2010-2-2 14:48:40

13# tonnyw
我拿带角度的悬臂梁进行调试,结果和手算的进行对比,划分了100个单元,没有问题

tonnyw 发表于 2010-2-3 02:10:46

17# chenjinghao

Can you send your code at featalk@gmail.com along with your manual calculation results? Thanks.

chenjinghao 发表于 2010-2-4 15:16:26

18# tonnyw
邮件我发到您的邮箱里了
页: [1]
查看完整版本: 求助有限元FORTRAN编程