FAQ Blender Add-On

Issues and examples using this model (available in the Models Repository)

FAQ Blender Add-On

Postby arnom on Wed Jan 12, 2011 12:44 pm

Dear all,

in this post I want to collect all issues arising with the Blender SPHysics Add-On that are NOT covered in the guide.

--------------------------------------------------------------------------------------------
#1 Known Bugs:
--------------------------------------------------------------------------------------------
#1.1 Gate in Tutorial not moving.
--------------------------------------------------------------------------------------------
FIX:
In movingObjects_3D.f add the following line:

inquire(file="MULT_MV",EXIST=mult_mv)

before (line 38)

if(mult_mv) call move_ext_file !arno

This forces mult_mv to be recalculated which is the source of the problem.

--------------------------------------------------------------------------------------------
#1.2 Particles are penetrating moving objects.
--------------------------------------------------------------------------------------------
FIX:
To avoid this you need to change the following in getdata_3D.f line 573ff:

replace:

if(iopt_gate .eq.1.or.
& iopt_wavemaker .eq.1.or.
& iopt_RaichlenWedge.eq.1.or.
& iopt_FloatingBodies.eq.1) then
iopt_movingObject = 1

by:

if(iopt_gate .eq.1.or.
& iopt_wavemaker .eq.1.or.
& iopt_RaichlenWedge.eq.1.or.
& iopt_FloatingBodies.eq.1.or.
& mult_mv) then !arno
iopt_movingObject = 1

--------------------------------------------------------------------------------------------
#2 Compiler Version
--------------------------------------------------------------------------------------------
With gfortran it is important to have version 4.2 or higher. This is due to the use of the Fortran 2003 standard which is not correctly implemented in older versions. Indication for this problem is the following output while compiling:

> make -f SPHYSICSgen_gfortran.mak
> gfortran -O3 -c -o SPHYSICSgen_3D.o SPHYSICSgen_3D.f
> In file mstack.f:8
>
> Included at SPHYSICSgen_3D.f:22
>
> double precision, allocatable :: rdata(:,:)
> 1
> Error: Attribute at (1) is not allowed in a TYPE definition
> In file mstack.f:14
>
> Included at SPHYSICSgen_3D.f:22
>
> integer, allocatable :: idata(:,:)
> 1
> Error: Attribute at (1) is not allowed in a TYPE definition

--------------------------------------------------------------------------------------------

This list will be updated as new issues arise.

Best regards,
Arno
Last edited by isecadmin on Thu Jan 27, 2011 9:48 am, edited 1 time in total.
Reason: original poster set topic type to global accidently -- wanted it changed to sticky
arnom
 
Posts: 54
Joined: Tue Mar 03, 2009 10:48 am
Location: Manchester, UK

Re: FAQ Blender Add-On

Postby arnom on Wed Jan 26, 2011 2:45 pm

--------------------------------------------------------------------------------------------
#3 Blender Script Recognition
--------------------------------------------------------------------------------------------

Apparently the Blender script cannot be found under the following circumstances:
- Unzipped installation
- Script in UnzipPath/.blender/scripts (or similar)
- Blender File opened by double click

Instead start Blender via its executable and then open the file in Blender and everything should be fine.

--------------------------------------------------------------------------------------------

Unfortunately it seems as if it is not possible to edit posts here. Thus I have to add one post after the other. To keep things clean in this thread please do not reply but instead open your own thread when posting. Thanks.
arnom
 
Posts: 54
Joined: Tue Mar 03, 2009 10:48 am
Location: Manchester, UK

Re: FAQ Blender Add-On

Postby arnom on Sat Feb 19, 2011 4:16 pm

With the new version SPHysics 2.2.1 Bugs no #1.1 and #1.2 should be fixed. Apparently #1.1 can still show up even with the new version. For now compile with -O0 to avoid it until a permanent solution can be found.
--------------------------------------------------------------------------------------------
#4.1 Limits are wrong
--------------------------------------------------------------------------------------------
This is a general bug occurring in Versions 2.2.0 and 2.2.1. To fix it remove lines 832-876 in getdata_3D.f. It is highly recommended to do so until it will be fixed in the next version.
arnom
 
Posts: 54
Joined: Tue Mar 03, 2009 10:48 am
Location: Manchester, UK

Re: FAQ Blender Add-On

Postby arnom on Sat Feb 19, 2011 4:50 pm

--------------------------------------------------------------------------------------------
#4.1 Limits of moving objects are calculated wrong
--------------------------------------------------------------------------------------------

There is a bug related to movement types 2 and 3 (sin and rot). This should be fixed by the following patch (diff generated output).

383a384,385
> if(nbf.le.0) nbf = 1 ! no fixed boundaries
> if(nbfm.le.0) nbfm = 1 ! no moving boundaries AND no fixed boundaries
418a421
> j = aout(1)
425a429
> k = aout(1)
515,520c519,524
< mv_xmin = minval(xp(1:nbf))
< mv_xmax = maxval(xp(1:nbf))
< mv_ymin = minval(yp(1:nbf))
< mv_ymax = maxval(yp(1:nbf))
< mv_zmin = minval(zp(1:nbf))
< mv_zmax = maxval(zp(1:nbf))
---
> mv_xmin = min(mv_xmin,minval(xp(1:nbf)))
> mv_xmax = max(mv_xmax,maxval(xp(1:nbf)))
> mv_ymin = min(mv_ymin,minval(yp(1:nbf)))
> mv_ymax = max(mv_ymax,maxval(yp(1:nbf)))
> mv_zmin = min(mv_zmin,minval(zp(1:nbf)))
> mv_zmax = max(mv_zmax,maxval(zp(1:nbf)))
524a529,561
> write(*,*) ' Enter own limits? (0=No,1=Yes)'
> read(*,*) i
> write(*,*) i
> if(i.eq.1)then
> write(*,*) ' Enter xmin,xmax'
> read(*,*) mv_xmin, mv_xmax
> write(*,*) mv_xmin, mv_xmax
> write(*,*) ' Enter ymin,ymax'
> read(*,*) mv_ymin, mv_ymax
> write(*,*) mv_ymin, mv_ymax
> write(*,*) ' Enter zmin,zmax'
> read(*,*) mv_zmin, mv_zmax
> write(*,*) mv_zmin, mv_zmax
> if(mv_xmin.gt.mv_xmax)then
> t = mv_xmin
> mv_xmin = mv_xmax
> mv_xmax = t
> endif
> if(mv_ymin.gt.mv_ymax)then
> t = mv_ymin
> mv_ymin = mv_ymax
> mv_ymax = t
> endif
> if(mv_zmin.gt.mv_zmax)then
> t = mv_zmin
> mv_zmin = mv_zmax
> mv_zmax = t
> endif
> write(*,*) ' Final limits '
> write(*,*) 'x:',mv_xmin,mv_xmax
> write(*,*) 'y:',mv_ymin,mv_ymax
> write(*,*) 'z:',mv_zmin,mv_zmax
> endif
582d618
< write(*,*) 'istart/end', istart, iend
585c621
< t = t0 * real(it)*dt3
---
> t = t0 + real(it)*dt3
605c641
< dt3 = 1/real(divide)
---
> dt3 = (t1-t0)/real(divide)
607c643
< t = real(it)*dt3
---
> t = t0 + real(it)*dt3
arnom
 
Posts: 54
Joined: Tue Mar 03, 2009 10:48 am
Location: Manchester, UK


Return to SPHysics User Discussions

Who is online

Users browsing this forum: No registered users and 2 guests

cron