## Output viscosity

Extension of Elmer in computational glaciology

### Output viscosity

Hi,

Is there an easy way of outputting the viscosity (e.g. in a vtu file) when using Glens flow law? I tried using "Save Materials" saving the "Viscosity" (sif below) but to no surprise it only outputs the constant going into Glens flow law (called 'Viscosity' ).

Thanks,

Josefin

Code: Select all
Material 1
Density = Real \$rhoi
Viscosity Model = String "power law"
Viscosity = Real \$eta
Viscosity Exponent = Real \$1.0/n
Critical Shear Rate = Real 1.0e-10
Cauchy = Logical False
End

....

Solver 6
Procedure = "SaveData" "SaveMaterials"
Parameter 1 = String "Viscosity"
End

...

Solver 8
Exec Solver = After TimeStep
Exec Interval = 1
Equation = "result output"
Procedure = "ResultOutputSolve" "ResultOutputSolver"
Output File Name = file "\$name".vtu"
Output Format = String vtu
End
josefin

Posts: 16
Joined: 29 Sep 2011, 15:29

### Re: Output viscosity

Hi Josefin,

Probably not. The problem is that with these very nonlinear phenomena the function must be evaluated at the integration point. Taking linear combination of the nodal viscosities is just not always accurate enough. And as in general we don't support any way of saving values at integration points this cannot be done without coding.

I would perhaps make a small solver that would go through the elements mimicing the way the N-S solver goes through the viscosity and save it to a table [x,y,z,visc], for example, for each Gaussian integration points. This you could analyze my Matlab, for example. Or perhaps take it in as glyphs in paraview. Combining element data and Gaussien integration points in paraview directly may be tricky.

-Peter
raback

Posts: 3092
Joined: 22 Aug 2009, 11:57
Location: Espoo, Finland

### Re: Output viscosity

Hej Peter,

OK then I know. Thanks!

Josefin
josefin

Posts: 16
Joined: 29 Sep 2011, 15:29

### Re: Output viscosity

Hi again,

After some rethinking I remembered that I already did this. In the ShearrateSolver you can find option
Code: Select all
Calculate Viscosity

and this should give you the fit of viscosity model to nodal points. If your target variable is not called "Velocity" then that should also be given but other than that it is almost the only parameter. Have the solver active where you want to compute the viscosity.

-Peter
raback

Posts: 3092
Joined: 22 Aug 2009, 11:57
Location: Espoo, Finland

Hi,