### save scalar crashed!!

Posted:

**04 Oct 2011, 17:35**Hi

My ElmerGUI crashed when i checked savescalar option(elmer 5.5 ubuntu10.04). my model is porous media from CT images, and i want to get the flow rate of the boundary. is there anything wrong about my option?
Elmer log
but when i unchecked savescalar option, and edit the *.sif, it worked and flux.dat was generated, but mass conservation did not matched. it seemed flow rate on bc7(nonslip wall)+bc3(Inlet)=bc6(outlet). but bc7 is a nonslip wall, flow rate should equal 0.
*.sif
flux.dat.name

My ElmerGUI crashed when i checked savescalar option(elmer 5.5 ubuntu10.04). my model is porous media from CT images, and i want to get the flow rate of the boundary. is there anything wrong about my option?

Code: Select all

```
Model
Equation
Savescalar
active for this equation set on
Edit Solver Setting
Procedure = "SaveData" "SaveScalars"
Filename = flux.dat
Save Flux on
Variable 1 = Flow Solution
Operator 1 = convective flux
Coefficient 1 = Density
```

Code: Select all

```
*** glibc detected *** ElmerGUI: free(): invalid next size (fast): 0x0aceec08 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(+0x6b591)[0x32e6591]
/lib/tls/i686/cmov/libc.so.6(+0x6cde8)[0x32e7de8]
/lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0x32eaecd]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0x5563741]
/usr/lib/libstdc++.so.6(_ZdaPv+0x1d)[0x556379d]
ElmerGUI[0x8105bb1]
ElmerGUI[0x80b9dc3]
ElmerGUI[0x81ac0cd]
/usr/lib/libQtCore.so.4(_ZN11QMetaObject8metacallEP7QObjectNS_4CallEiPPv+0x3a)[0x1d07c9a]
/usr/lib/libQtCore.so.4(_ZN11QMetaObject8activateEP7QObjectPKS_iPPv+0x2d5)[0x1d163d5]
/usr/lib/libQtGui.so.4(_ZN7QAction9triggeredEb+0x49)[0x124cbd9]
/usr/lib/libQtGui.so.4(_ZN7QAction8activateENS_11ActionEventE+0x7c)[0x124edcc]
/usr/lib/libQtGui.so.4(+0x5d460c)[0x16f260c]
/usr/lib/libQtGui.so.4(+0x5daabb)[0x16f8abb]
/usr/lib/libQtGui.so.4(_ZN5QMenu17mouseReleaseEventEP11QMouseEvent+0x147)[0x16f9ac7]
/usr/lib/libQtGui.so.4(_ZN7QWidget5eventEP6QEvent+0x528)[0x12b17f8]
/usr/lib/libQtGui.so.4(_ZN5QMenu5eventEP6QEvent+0x6c)[0x16fb0cc]
/usr/lib/libQtGui.so.4(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0xac)[0x12534dc]
/usr/lib/libQtGui.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent+0xb17)[0x125a9f7]
/usr/lib/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x7b)[0x1d02a3b]
/usr/lib/libQtGui.so.4(_ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Eb+0xf2)[0x1259952]
/usr/lib/libQtGui.so.4(+0x1c75cf)[0x12e55cf]
/usr/lib/libQtGui.so.4(_ZN12QApplication15x11ProcessEventEP7_XEvent+0x1771)[0x12e4511]
/usr/lib/libQtGui.so.4(+0x1f560a)[0x131360a]
/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1d5)[0x4b105e5]
/lib/libglib-2.0.so.0(+0x3f2d8)[0x4b142d8]
/lib/libglib-2.0.so.0(g_main_context_iteration+0x68)[0x4b144b8]
/usr/lib/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x65)[0x1d2e5d5]
/usr/lib/libQtGui.so.4(+0x1f5135)[0x1313135]
/usr/lib/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x49)[0x1d01059]
/usr/lib/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xfa)[0x1d014aa]
/usr/lib/libQtCore.so.4(_ZN16QCoreApplication4execEv+0xaf)[0x1d0569f]
/usr/lib/libQtGui.so.4(_ZN12QApplication4execEv+0x27)[0x1253577]
ElmerGUI[0x80a590b]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x3291bd6]
ElmerGUI[0x807c041]
```

Code: Select all

```
Solver 3
Equation = SaveScalars
Filename = flux.dat
Save Flux = True
Coefficient 1 = Density
Procedure = "SaveData" "SaveScalars"
Operator 1 = convective flux
Variable 1 = Flow Solution
End
```

Code: Select all

```
Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
End
Simulation
Max Output Level = 4
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Simulation Type = Steady state
Steady State Max Iterations = 1
Output Intervals = 1
Timestepping Method = BDF
BDF Order = 1
Solver Input File = case.sif
Post File = case.ep
End
Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.67e-08
Permittivity of Vacuum = 8.8542e-12
Boltzmann Constant = 1.3807e-23
Unit Charge = 1.602e-19
End
Body 1
Target Bodies(1) = 1
Name = "Body 1"
Equation = 1
Material = 1
End
Solver 1
Equation = Navier-Stokes
Procedure = "FlowSolve" "FlowSolver"
Variable = Flow Solution[Velocity:3 Pressure:1]
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-8
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-8
Linear System Preconditioning = ILU0
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 1
Linear System Precondition Recompute = 1
End
Solver 2
Equation = Result Output
Output Format = Vtk
Procedure = "ResultOutputSolve" "ResultOutputSolver"
Output File Name = case
End
Solver 3
Equation = SaveScalars
Filename = flux.dat
Save Flux = True
Coefficient 1 = Density
Procedure = "SaveData" "SaveScalars"
Operator 1 = convective flux
Variable 1 = Flow Solution
End
Equation 1
Name = "Equation 1"
Active Solvers(2) = 1 2
End
Material 1
Name = "Water (room temperature)"
Viscosity = 1.002e-3
Heat expansion Coefficient = 0.207e-3
Heat Conductivity = 0.58
Sound speed = 1497.0
Viscosity = 1.002e-3
Heat Capacity = 4183.0
Density = 998.3
End
Boundary Condition 1
Target Boundaries(1) = 1
Name = "Wall"
Noslip wall BC = True
Save Scalars = True
End
Boundary Condition 2
Target Boundaries(1) = 2
Name = "Wall"
Noslip wall BC = True
Save Scalars = True
End
Boundary Condition 3
Target Boundaries(1) = 3
Name = "Inlet"
Velocity 3 = 0.01
Velocity 1 = 0
Velocity 2 = 0
Save Scalars = True
End
Boundary Condition 4
Target Boundaries(1) = 4
Name = "Wall"
Noslip wall BC = True
Save Scalars = True
End
Boundary Condition 5
Target Boundaries(1) = 5
Name = "Wall"
Noslip wall BC = True
Save Scalars = True
End
Boundary Condition 6
Target Boundaries(1) = 6
Name = "Outlet"
Save Scalars = True
External Pressure = 0
End
Boundary Condition 7
Target Boundaries(1) = 7
Name = "Wall"
Noslip wall BC = True
Save Scalars = True
End
```

flux.datVariables in columns of matrix: flux.dat

1: convective flux: flow solution over bc 1

2: convective flux: flow solution over bc 2

3: convective flux: flow solution over bc 3

4: convective flux: flow solution over bc 4

5: convective flux: flow solution over bc 5

6: convective flux: flow solution over bc 6

7: convective flux: flow solution over bc 7

8: min convective flux: flow solution

9: max convective flux: flow solution

-6.719555649773E-063 -7.165301538047E-063 -8.855297012698E-009 -8.142764091558E-061 8.458442801568E-063 9.542611847542E-009 -6.873556520302E-010 -9.983000000000E+000 9.674555313375E+001