Browse documentation
Docs/Functionality

Materials science research starters

These synthetic examples combine declared inputs, accepted input ranges, named outputs, chart data, and repeatable scenarios. They are starting points for a research calculation, with…

Materials science research starters

These synthetic examples combine declared inputs, accepted input ranges, named outputs, chart data, and repeatable scenarios. They are starting points for a research calculation, with assumptions and numerical checks visible in the model. Their parameters do not identify a particular material.

Starter Main question Baseline reference
Diffusion scenarios How does a heat-treatment temperature change a diffusion profile? At 1000 K and one hour: diffusivity 9.734713598e-13 m²/s; concentration at 100 µm approximately 0.3858379883 wt pct
Transformation fit and residuals Does a kinetic fit describe the measured fractions and their residuals? Characteristic time approximately 100.037954 s; exponent approximately 2.490370; residual sum of squares approximately 5.713470247e-5
Heat equation convergence Is the remaining error from the spatial grid or the time integrator? At Fourier number 0.1: continuum center 0.3727078389; 21-node center approximately 0.3734643407; 41-node center approximately 0.3728969372

Open, edit, and preserve a scenario

Open a starter's .grid source in Grid. Read its Assumptions output, then use the I/O surface to change declared inputs. The worksheet repeats the main outputs with unit labels; charts bind to named data produced by the same formulas. Scientific line series explicitly use smooth = false, connecting computed sample values with straight segments. To add another plot, select a named record array such as Profile or FitData, or a numeric two-column array, and choose Insert Plot. Check the selected X/Y fields and their unit labels before interpreting the result.

Save the initial state as Baseline using the existing scenario controls. Make the change suggested by ScenarioGuide and save that alternative. Restore Baseline and compare its outputs. Reset returns inputs to their authored defaults; restoring a scenario does not rewrite those defaults. Export .gridoc when the handoff needs saved scenarios as well as equations. These .grid starters contain source and defaults, without prepopulated scenario assets.

The examples use strict, explicit unit names, and VALIDATE input contracts. Their accepted ranges are deliberately bounded teaching windows, not general material validity ranges. Engineering values remain numeric, and CONVERT uses the shared unit vocabulary. A suffix such as _m2_s documents a unit; it is not itself a dimensional type annotation. See Assignments and units when extending a model with physical type tags and dimensional checking.

Diffusion: a temperature scenario with explicit conversions

The model evaluates the Arrhenius diffusivity

D = D0 * exp(-(Q / (R * T)))

and the constant-surface, semi-infinite solution

(C(x,t) - C_initial) / (C_surface - C_initial) = erfc(x / (2 * sqrt(D*t)))

The Celsius input is an absolute temperature, converted to kelvin before the Arrhenius calculation. Hours become seconds; micrometers become meters. The synthetic parameters are D0 = 2e-5 m²/s, Q = 140000 J/mol, and R = 8.31446261815324 J/(mol K). Initial and surface concentrations are 0.2 and 1.0 wt pct. The output named DiffusionLength_um is sqrt(D*t), rather than a front location or the 2*sqrt(D*t) denominator in the erfc solution.

At the default 726.85 °C, the converted temperature is 1000 K, the duration is 3600 s, and the selected depth is 0.0001 m. The diffusion length is approximately 59.19879133 µm and normalized uptake is approximately 0.2322974854. Change Temperature_C to 826.85 °C while keeping the other inputs fixed:

Quantity Baseline: 1000 K Higher temperature: 1100 K
Diffusivity (m²/s) 9.734713598e-13 4.498986682e-12
sqrt(D*t) (µm) 59.19879133 127.26488933
Normalized uptake at 100 µm 0.2322974854 0.5784719440
Concentration at 100 µm (wt pct) 0.3858379883 0.6627775552

The chart samples depths from 0 to 500 µm at 10 µm intervals. At the surface, the solution must equal the specified surface concentration. The model assumes a homogeneous solid, uniform initial concentration, constant temperature, constant diffusivity, and a maintained surface concentration. Check that the sample is thick enough to support the semi-infinite approximation over the chosen treatment. Finite thickness, varying temperature, phase changes, and concentration-dependent diffusion require a different model.

The spreadsheet exchange example remains a smaller numeric example for formula export. These richer starters also contain input contracts and chart declarations. Review export diagnostics; an Excel workbook does not replace a Grid document's scenario or surface state.

Transformation: inspect the fit and its residuals

Eight synthetic fractions at 20–200 s are fitted to

X(t) = 1 - exp(-((t/tau)^n))

The fit estimates log(tau) and log(n); exponentiating the fitted values keeps the recovered parameters positive. This changes the parameter coordinates, while preserving the unweighted sum-of-squared-residuals objective. It does not supply bounds on the positive parameters, enforce a microscopic mechanism, or establish parameter identifiability.

Both initial-guess inputs must be positive. The default guess is 80 s and 2. Try the alternative 120 s and 3, then compare the fitted coefficients and objective. Agreement from these two starting points is a useful check; it is not a proof of a global optimum.

The Transformation fit chart shows the eight observations and fitted values at those same times. Its connecting line is a visual guide between samples. The separate Transformation residuals chart shows measured minus fitted fraction, preserving the sign of each discrepancy. ResidualValues also exposes the individual values for inspection. If comparing with CURVE_FIT.REPORT, its residuals use fitted minus observed: negate one array before comparing signs. Squaring removes this sign difference, so it does not change the sum-of-squares objective.

Output Meaning Baseline reference
CharacteristicTime_s Positive fitted tau 100.037954 s
AvramiExponent Positive fitted exponent 2.490370
SumSquaredResiduals Sum of eight squared residuals 5.713470247e-5
RootMeanSquaredResidual sqrt(SSE / 8) 0.0026724217
ResidualStandardError sqrt(SSE / (8 - 2)) 0.0030858468
Prediction Transformed fraction at the selected 150 s 0.935581
HalfTransformationTime_s tau * LN(2)^(1/n) 86.3473050 s

The residual standard error uses six residual degrees of freedom. It is a noise-scale summary under the usual independent, equal-variance residual assumptions; it is not a coefficient standard error, confidence interval, or validation of those assumptions. Inspect residual patterns and measurement uncertainty before interpreting a real experiment. Predictions outside 20–200 s are extrapolations.

For the structured report, open the optional transformation fitting report companion in a runtime that supports CURVE_FIT.REPORT. This separate model requests one report solve and uses FittingReport.parameters for its other outputs. The ordinary starter keeps its coefficient-only calculation. Both models retain the same three inputs and the same numerical outputs and charts.

Inspect FittingReport for the stopping reason, iteration count, objective, residual scatter, and local Jacobian rank and conditioning. Its coefficient names are log_tau and log_exponent: exponentiate these to recover the physical quantities shown by CharacteristicTime_s and AvramiExponent. Its condition number describes these logarithmic coordinates, not the untransformed time/exponent Jacobian. The report's fitted-minus-observed residuals have the opposite sign to this model's measured-minus-fitted chart.

For the baseline data, the current reference run stops after five iterations on the parameter-step threshold, with local rank 2 and a Jacobian condition number near 3.714802. The final max(abs(Jᵀr)) is about 3.80e-9, above the requested 1e-12 tolerance: this alternate stopping condition is explicit, not a claim of gradient convergence. Results can vary in their final digits or stopping path across compatible numerical builds. Full local rank does not establish global identifiability, and this report does not estimate coefficient uncertainty or confidence intervals.

The preview pages observation rows in groups of 50 and exposes complete values separately. Reports accept up to 100000 observations; dense final-rank diagnostics are omitted above 64 coefficients or 262144 Jacobian entries, with an explicit unavailable status. These limits are ample for this eight-observation example. See the fitting guide for interpreting coefficients, residuals, stopping reasons, and rank information.

The fit formula groups the positive power explicitly before negation. In Grid, -(t/tau)^n raises a negative base to the exponent; -((t/tau)^n) negates the positive power. The latter is the intended transformation law. For very small transformed fractions, -EXPM1(-exposure) avoids subtracting two nearly equal numbers. The starter uses this stable form for prediction and residual inspection; its fit data are far enough from zero for the grouped 1 - EXP form. The small-exposure example is a focused demonstration of this distinction.

Heat: separate space and time errors

The heat example solves a homogeneous slab with constant diffusivity, equal fixed face temperatures, and a sine initial excess-temperature profile. It uses dimensionless position xi = x/L, time Fo = alpha*t/L², and normalized excess temperature theta. Thus

d(theta)/d(Fo) = d²(theta)/d(xi)²
initial theta = sin(pi*xi)
theta(0,Fo) = theta(1,Fo) = 0
exact theta = exp(-(pi²*Fo)) * sin(pi*xi)

L is the full slab length. The default 10 mm length and 1 mm²/s diffusivity map Fo = 0.1 to 10 s. Changing length or diffusivity at fixed Fourier number changes the corresponding physical time, while leaving the normalized field unchanged.

The starter requests two output time levels on 21 and 41 spatial nodes, including both endpoints. At the default time, the spatial error decreases by approximately 4.0006 when spacing is halved, giving an observed order near 2.0002. Set FourierNumber to 0.2 for the Later cooling scenario: the physical time becomes 20 s and the continuum center becomes approximately 0.1389111331.

A separate reference uses the exact solution of the discrete spatial system. For node spacing h, the sine mode decays with rate -4*sin(pi*h/2)^2/h^2. Comparing the numerical center against this mode isolates time-integration error. Comparing against the continuum mode includes both time and space error. The tight rtol = 1e-9 and atol = 1e-12 controls make time error small in this example; these local controls do not guarantee a particular global error. The reference comparison checks that distinction.

The displayed SpatialError_* values include the remaining, much smaller time error. The observed-order calculation is meaningful only while both errors are resolved above numerical noise. A real temperature profile, variable properties, sources, or other boundary conditions need their own convergence study and an appropriate reference or error estimator.

Review and share the result

Before adopting a starter for measured data, replace the synthetic constants, state the physical assumptions, and retain reference checks suited to the new problem. Give units in output names and chart axes. Inspect the plotted data alongside the chart. Saved scenarios support repeatable comparisons; they do not represent probability distributions or uncertainty ensembles.

The fit and PDE examples use Grid-specific numerical operations, and stable predictions use EXPM1. Formula XLSX export can decline unsupported functions or semantics. Use an explicit values export for a numerical snapshot, or a .gridoc document to retain the source and Grid-specific work. See Errors and diagnostics for solver failure context and Surfaces for chart bindings.