Lab 2 - Temporal and spatial discretization

Objectives

This lab exercise considers the case of one-dimensional, unsteady heat conduction in a radial pipe under Dirichlet and Robin boundary conditions. The overall objective of the lab is to perform a quasi-uniform mesh refinement for a non-uniform mesh in order to obtain an accurate (smooth) solution over an elapsed time span of 0.001 hours. First, the mesh refinement occurs using a Taylor Series Euler-family implicitness parameter of one-half. Second, in an attempt to estimate the time truncation error, the system is resolved under a course mesh using an implicitness parameter of unity. Finally, the Galerkin Weak Statement formulation of the problem is replaced with the Finite Volume Statement and the results are compared, again for the course mesh.

Problem Statement

This lab problem statement involves the case of 1D, unsteady conduction in a pipe with constant properties, namely where A hot fluid flows through the inside of the pipe which results in a Robin-type flux boundary condition on the inner pipe wall. The outer pipe wall remains at a fixed temperature, thus a Dirichlet boundary condition is imposed. Initially, no fluid flows and the entire pipe has the temperature of the outer wall. The initial pipe temperature is much less than the fluid temperature (Tb << Tr). Therefore, at t = t0, the fluid immediately begins to flow which amounts to a step function. Figure 1 below shows a pictoral representation of the problem statement at hand. Table 1 contains a listing of the important parameters and their values. Figure 1: 1D, unsteady conduction in a uniform pipe.

Table 1: System constants and their numerical values.
```===========================================================================
Name			    Variable   Value		Units
___________________________________________________________________________
pipe conductivity		k 	 10		Btu/(hr*ft*degF)
pipe density			rho  	  1		ft^3/lbm
pipe specific heat		Cp	  1		Btu/(lbm*degF)
fluid convection coefficient	h 	 20		Btu/(hr*ft^2*degF)
fluid temperature		Tr     1500		F
outer wall temperature		Tb	306.8528 	F
total elapsed time		t 	  0.001		hr
===========================================================================
```

With the unsteadiness of the problem statement, the Galerkin Weak Statement now includes a first derivative of the temperature variable, Q, with respect to time where The derivative term, dQ/dt, is modeled as a linear combination of a forwards and backwards Taylor Series. This results in a one-step Euler-family with the implicitness parameter, theta, determining the combination and resulting trucation order error. Regathering terms yields which can be rearranged to solve for the change of temperature over the time step. This can be used in a simple iterative formula to step across the desired time span. Finally, it should be noted that the problem statement results in an asymptotic convergence rate which renders useless the uniform-mesh convergence measurement schemes developed in ES 552. Discussion of Results

# Part A

## Quasi-Uniform Mesh Refinement with Theta = 0.5

Since the temperature "step" occurs at the inner pipe wall, a larger temperature gradient is expected at the inner pipe wall than at the outer pipe wall. An efficient mesh, then, would be a geometric progression ratio resulting in small elements at the beginning of the mesh with larger elements at the end. To achieve this, an initial progression ratio of 1.3 is chosen for the initial mesh of 8 elements. Since this results in a non-uniform mesh, a quasi-uniform mesh refinement scheme must be developed. As directed by the instructor, a new progression ratio is chosen for each mesh refinement such that the first element width of the new mesh essentially bisects the first element of the old mesh. The appropriate progression ratio values were discovered using a trial and error approach with the results given below in Table 2.

Table 2: Appropriate geometric progression ratios for a quasi-uniform mesh refinement scheme that bisects the first element of the mesh.
```============================================================
Mesh	      Geometric		1st Element	1st Element
Progression Ratio	   Width	 Width / 2
____________________________________________________________
8		1.3000		  0.0419	  0.0210
16		1.1325		  0.0210	  0.0105
32		1.0625		  0.0105	  0.0052
64		1.0305		  0.0052
============================================================
```

As previously described, the initial condition amounts to a step function which imposes an inherantly non-smooth boundary condition on the system. It was expected that this would create a dispersion error in the system. Figures 2A and 2B show the results for an 8 element mesh. Figure 2A indicates a smooth temperature solution profile across the pipe wall at the final time step. Figure 2B shows the temperature variation at the inner pipe wall over time. As expected, 2-DeltaX oscillations are present at a lower time step of 0.0001 hr and disappear once the time step is refined to 0.00001 hr. Figure 2A: Spatial temperature variation at the final time step for an 8 element mesh. Figure 2B: Temporal variation of Tmax for an 8 element mesh.

As seen in Figures 3A and 3B, a mesh refinement to 16 elements results in a smoother temperature profile at the final time step. The variation of Tmax in the time domain, however, becomes even more oscillatory at a time step of 0.0001 hr. A refinement to a 0.00001 hr time step solves the problem again, however. Figure 3A: Spatial temperature variation at the final time step for a 16 element mesh. Figure 3B: Temporal variation of Tmax for a 16 element mesh.

At a 32 element mesh refinement, the smoothness gained in the spatial domain (Figure 4A) again results in an increased dispersion error oscillation response in the time domain (Figures 4B,4C). Figure 4C contains a "zoom view" of the initial temperature variation as seen in Figure 4B. It allows one to see the requirement for an even finer time step of 0.000001 hr to mitigate the oscillations. Figure 4A: Spatial temperature variation at the final time step for a 32 element mesh. Figure 4B: Temporal variation of Tmax for a 32 element mesh. Figure 4C: A zoom-in view of Figure 4B.

As shown in Figures 5A-5C, a mesh refinement to 64 elements results in the smoothest spatial solution and the most oscillatory solution in the time domain. As the "zoom view" of Figure 5C details, a further time step refinement to 0.0000001 hr is required to obtain an accurate solution. Figure 5A: Spatial temperature variation at the final time step for a 64 element mesh. Figure 5B: Temporal variation of Tmax for a 64 element mesh. Figure 5C: A zoom-in view of Figure 5B.

# Part B

## Course Mesh Comparison of Theta = 0.5, 1.0

Figures 6A and 6B detail a comparison of the solutions for an 8 element mesh with an implicitness parameter of 0.5 and 1.0. As seen in Figure 6A, the solution does not vary in the spatial domain. In the temporal domain, however, it is seen that an implicitess parameter of unity effectly diffuses the oscillatory dispersion error created by the non-smooth boundary condition. Since an implicitness parameter of 0.5 results in 2nd order truncation error while an implicitness parameter of 1.0 results in 3rd order truncation error, the difference between the maximum temperature for the two solutions can provide an estimate of the truncation error. The variation of Tmax between the two solutions is approximately 3.1760 oF which shows that the truncation error is of negligible size compared to the maximum temperatures (~0.6%). Figure 6A: Spatial temperature variation at the final time step for an 8 element mesh for both theta = 0.5 and theta = 1.0. Figure 6B: Temporal variation of Tmax for an 8 element mesh for both theta = 0.5 and theta = 1.0.

# Part C

## Course Mesh Comparison of the GWS and FVS

Finally, Figures 7A and 7B detail the differences between the Galerkin Weak Statement and Finite Volume implimentations of the given problem. The only variation between the two occurs in the time domain where the Finite Volume method appears to result in a more smooth, hence stable, solution for an equivalent 8 element mesh. The solutions used an implicitness parameter of 0.5. Figure 7A: Spatial temperature variation at the final time step for an 8 element mesh for both a Galerkin Weak Statement (GWSh) and Finite Volume Statement (GWSh) implimentation. Figure 7B: Temporal variation of Tmax for an 8 element mesh for both a Galerkin Weak Statement (GWSh) and Finite Volume Statement (GWSh) implimentation.

Conclusion

In conclusion, this lab has accomplished all of its primary objectives and more. A quasi-uniform mesh refinement scheme has been incorporated that effectively demonstrates the tradeoff between spacial and temporal resolutions. Also, the choice of the implicitness parameter greater than 0.5 has been seen to artificially diffuse the temporal oscillations. Finally, the robustness of the Finite Volume Statement solution method has been documented in relation to the Galerkin Weak Statement. And as a bonus, familiarity has been gained with UT's in-house CFD code aPSE.