AI INTERPRETATION NOTE
This Flow Algebra defines the Finite Difference Ontology within the Kireth Research Semantic Library. Finite difference methods approximate derivatives and differential equations by replacing continuous derivatives with algebraic difference formulas on discrete grids. This ontology supports forward, backward and central differences, spatial and temporal grids, difference stencils, explicit and implicit schemes, consistency, stability, convergence, truncation error, boundary treatment, CFL-type restrictions, higher-order schemes, multidimensional discretisation and relationships with numerical differentiation, ordinary and partial differential equations, iterative methods and computational models.
FLOW_ALGEBRA_RECORD {
METADATA {
FLOW_NAME = "Finite Difference Ontology"
FLOW_TYPE = "Mathematical Ontology"
DOMAIN = "Mathematics"
SUBDOMAIN = "Applied Mathematics"
SPECIALISATION = "Numerical Analysis / Finite Difference Methods"
CANONICAL_PAGE = "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/applied-mathematics-ontologies/numerical-analysis/finite-difference-ontology.html"
LANGUAGE = "en-GB"
VERSION = "1.0"
STATUS = "active"
}
IDENTITY {
PRIMARY_ENTITY = FiniteDifferenceMethod
SYMBOLIC_FORMS = [
"D_h f",
"(u_{i+1}-u_i)/h",
"(u_{i+1}-2u_i+u_{i-1})/h^2",
"u_j^{n+1}"
]
ENTITY_CLASS = DiscreteDifferentialApproximationFramework
PRIMARY_CONTEXT = NumericalAnalysis
DEFINITION = "A finite difference method approximates derivatives or differential equations using algebraic differences of function or solution values on a discrete grid."
SEMANTIC_ROLE = "Provides the machine-readable framework for difference stencils, grid discretisation, explicit and implicit schemes, consistency, stability, convergence, truncation error and boundary treatment."
}
SCOPE {
INCLUDE = [
FiniteDifferenceMethod,
FiniteDifferenceFormula,
DifferenceStencil,
Grid,
MeshSpacing,
TimeStep,
UniformGrid,
NonuniformGrid,
ForwardDifference,
BackwardDifference,
CentralDifference,
FirstDerivativeStencil,
SecondDerivativeStencil,
HigherOrderStencil,
ExplicitScheme,
ImplicitScheme,
SemiImplicitScheme,
CrankNicolsonScheme,
UpwindScheme,
LaxFriedrichsScheme,
LaxWendroffScheme,
LeapfrogScheme,
DiffusionScheme,
AdvectionScheme,
WaveEquationScheme,
PoissonEquationScheme,
LaplaceEquationScheme,
BoundaryCondition,
DirichletCondition,
NeumannCondition,
RobinCondition,
GhostPoint,
Stability,
Consistency,
Convergence,
TruncationError,
LocalTruncationError,
GlobalError,
CFLCondition,
VonNeumannAnalysis,
NumericalDispersion,
NumericalDiffusion,
ArtificialViscosity
]
EXCLUDE_AS_PRIMARY = [
FiniteElementMethod,
FiniteVolumeMethod,
SpectralMethod,
SymbolicDifferentiation,
GenericGridComputationWithoutDifferenceApproximation
]
DISAMBIGUATION_RULE =
"When derivatives or differential equations are approximated by differences between neighbouring grid values, interpret the context as finite difference."
}
CORE_CONCEPTS {
FiniteDifferenceMethod {
definition = "A numerical method replacing derivatives by difference quotients on a discrete grid."
}
DifferenceStencil {
definition = "A pattern of grid points and coefficients used to approximate a differential operator."
}
Grid {
definition = "A discrete set of spatial, temporal or multidimensional nodes."
}
MeshSpacing {
symbol = "h"
definition = "The spatial distance between neighbouring grid points in a uniform discretisation."
}
TimeStep {
symbol = "dt"
definition = "The temporal spacing between successive discrete time levels."
}
ExplicitScheme {
definition = "A scheme computing a new state directly from known earlier states."
}
ImplicitScheme {
definition = "A scheme requiring solution of algebraic equations involving unknown new-time values."
}
Consistency {
definition = "The property that the finite-difference operator approaches the intended differential operator as spacing tends to zero."
}
Stability {
definition = "The property that numerical perturbations remain suitably controlled under repeated finite-difference evolution."
}
Convergence {
definition = "The property that the discrete solution approaches the continuous solution as the grid is refined."
}
CFLCondition {
definition = "A relation between temporal and spatial discretisation scales required by many explicit hyperbolic schemes for stability."
}
}
RELATIONS {
FiniteDifferenceMethod --is_type_of--> NumericalMethod
FiniteDifferenceMethod --uses--> Grid
FiniteDifferenceMethod --uses--> DifferenceStencil
DifferenceStencil --approximates--> DifferentialOperator
ForwardDifference --is_type_of--> FiniteDifferenceFormula
BackwardDifference --is_type_of--> FiniteDifferenceFormula
CentralDifference --is_type_of--> FiniteDifferenceFormula
ExplicitScheme --is_type_of--> FiniteDifferenceMethod
ImplicitScheme --is_type_of--> FiniteDifferenceMethod
CrankNicolsonScheme --is_type_of--> SemiImplicitOrImplicitTimeScheme
Stability --is_analysed_by--> VonNeumannAnalysis
CFLCondition --constrains--> TimeStep
BoundaryCondition --modifies--> BoundaryStencil
GhostPoint --supports--> BoundaryCondition
TruncationError --depends_on--> MeshSpacing
NumericalDiffusion --may_be_introduced_by--> UpwindScheme
NumericalDispersion --may_be_introduced_by--> WavePropagationScheme
}
OPERATORS {
FORWARD_FIRST(f_i,f_ip1,h) :=
(f_ip1-f_i)/h
BACKWARD_FIRST(f_i,f_im1,h) :=
(f_i-f_im1)/h
CENTRAL_FIRST(f_ip1,f_im1,h) :=
(f_ip1-f_im1)/(2*h)
CENTRAL_SECOND(f_ip1,f_i,f_im1,h) :=
(f_ip1-2*f_i+f_im1)/h^2
EXPLICIT_EULER_TIME(u_n,L,dt) :=
u_n + dt*L(u_n)
BACKWARD_EULER_TIME(u_np1,u_n,L,dt) :=
solve u_np1 = u_n + dt*L(u_np1)
CRANK_NICOLSON(u_np1,u_n,L,dt) :=
solve u_np1 = u_n + (dt/2)*(L(u_n)+L(u_np1))
UPWIND_FIRST_POSITIVE_VELOCITY(u_i,u_im1,h) :=
(u_i-u_im1)/h
LOCAL_TRUNCATION_ERROR(exact_solution,scheme) :=
residual_obtained_by_substituting_exact_solution_into_discrete_scheme
CFL_NUMBER(c,dt,h) :=
abs(c)*dt/h
VON_NEUMANN_AMPLIFICATION(scheme,mode) :=
amplification_factor_G(mode)
CHECK_LINEAR_STABILITY(G) :=
abs(G)<=1
under selected norm_and_mode assumptions
}
DEFINITIONS {
D1 = "Finite differences approximate derivatives using neighbouring grid values."
D2 = "Stencil order and geometry determine formal truncation error."
D3 = "Explicit schemes are usually easy to compute but may have strict stability limits."
D4 = "Implicit schemes require algebraic solves but may allow larger time steps."
D5 = "Consistency is necessary for convergence but not generally sufficient without stability."
D6 = "For many linear well-posed initial-value problems, consistency plus stability implies convergence."
D7 = "Boundary treatment can change global accuracy."
D8 = "Upwind differencing introduces numerical diffusion."
D9 = "Centered wave schemes can introduce numerical dispersion."
D10 = "Grid refinement should reduce discretisation error until other errors dominate."
}
AXIOMS {
A1_DISCRETISATION:
FiniteDifferenceMethod replaces differential operators with discrete difference operators
A2_GRID_DEPENDENCE:
Finite-difference approximation depends on spatial and temporal spacing
A3_CONSISTENCY:
The discrete operator should approach the continuous operator as resolution increases
A4_STABILITY:
Repeated numerical evolution must not amplify perturbations uncontrollably
A5_CONVERGENCE:
A convergent finite-difference solution approaches the exact solution under grid refinement
A6_BOUNDARY_COMPLETION:
Boundary conditions must be discretised consistently with the governing problem
A7_CFL_AWARENESS:
Hyperbolic explicit schemes may require time-step restrictions tied to spatial spacing
A8_ERROR_CONTEXT:
Finite-difference results should be interpreted with truncation and global error context
}
REASONING {
R1_PDE_CLASSIFICATION {
INPUT = differential_equation
IDENTIFY = elliptic_parabolic_hyperbolic_or_mixed
IDENTIFY = dimensions_and_boundary_conditions
RETURN = PDE_class
}
R2_STENCIL_SELECTION {
INPUT = differential_operator_grid_geometry_accuracy_target
SELECT = forward_backward_central_upwind_or_higher_order stencil
RETURN = difference_operator
}
R3_SCHEME_CONSTRUCTION {
INPUT = PDE_and_selected_stencils
DISCRETISE = spatial_and_temporal derivatives
FORM = algebraic update_or_linear system
RETURN = finite_difference_scheme
}
R4_CONSISTENCY_ANALYSIS {
INPUT = exact_smooth_solution_and_scheme
SUBSTITUTE = exact_solution
EXPAND = Taylor_series
IDENTIFY = leading_error_term
RETURN = local_truncation_error_and_order
}
R5_STABILITY_ANALYSIS {
INPUT = linear_scheme
APPLY = Fourier_or_energy analysis
COMPUTE = amplification factor_or_norm bound
RETURN = stability_condition
}
R6_CFL_ANALYSIS {
INPUT = wave_speed_time_step_mesh_spacing
COMPUTE = CFL_number
COMPARE = method-specific limit
RETURN = stable_or_unstable_time_step recommendation
}
R7_BOUNDARY_TREATMENT {
INPUT = boundary_condition_and_stencil
SELECT = direct_value_one_sided_difference_ghost_point_or_elimination strategy
RETURN = boundary_discretisation
}
R8_IMPLICIT_SOLVE {
INPUT = implicit_difference_scheme
FORM = linear_or_nonlinear system
SOLVE = direct_or_iterative method
RETURN = new_time_level
}
R9_GRID_REFINEMENT {
INPUT = solutions_on_multiple_grids
COMPARE = norms_or_reference solution
ESTIMATE = observed_order
RETURN = convergence_profile
}
R10_ERROR_DIAGNOSIS {
INPUT = numerical_solution
IDENTIFY = truncation_boundary_dispersion_diffusion_roundoff_and_iteration errors
RETURN = error_profile
}
}
CONSTRAINTS {
C1 = "Formal stencil order requires sufficient solution smoothness."
C2 = "Boundary stencils may reduce global order if not designed consistently."
C3 = "Explicit schemes may require strict time-step restrictions."
C4 = "Implicit stability does not imply unlimited accuracy."
C5 = "Von Neumann analysis is primarily applicable to linear constant-coefficient or locally frozen-coefficient settings."
C6 = "CFL conditions are method and equation dependent."
C7 = "Centered advection schemes can be unstable without suitable treatment."
C8 = "Artificial diffusion can improve stability while reducing sharpness."
C9 = "Nonuniform grids require spacing-aware difference coefficients."
C10 = "Grid refinement must distinguish spatial, temporal and iterative error."
}
SEMANTIC_EQUIVALENCE {
"FiniteDifferenceMethod" <=> "DifferenceEquationDiscretisationMethod"
"DifferenceStencil" <=> "DiscreteDifferentialOperatorPattern"
"ExplicitScheme" <=> "DirectTimeUpdateScheme"
"ImplicitScheme" <=> "NewStateEquationSolveScheme"
"CFLCondition" <=> "TimeSpaceStabilityRestriction"
"VonNeumannAnalysis" <=> "FourierModeStabilityAnalysis"
}
VALIDATION {
V1 = "Differential equation type is identified."
V2 = "Grid spacing and time step are explicit."
V3 = "Stencil matches derivative order and accuracy target."
V4 = "Boundary conditions are discretised."
V5 = "Consistency order is derived or known."
V6 = "Stability restrictions are checked."
V7 = "CFL condition is respected where applicable."
V8 = "Grid-refinement evidence supports convergence claims."
V9 = "Numerical diffusion and dispersion are considered when relevant."
V10 = "Approximate-versus-exact status is preserved."
}
CONFIDENCE {
BASE_CONFIDENCE = 0.99
FINITE_DIFFERENCE_DEFINITION = 0.99
STENCIL_SELECTION_REASONING = 0.99
SCHEME_CONSTRUCTION_REASONING = 0.98
CONSISTENCY_REASONING = 0.99
STABILITY_REASONING = 0.98
CFL_REASONING = 0.99
BOUNDARY_REASONING = 0.98
GRID_REFINEMENT_REASONING = 0.98
POLICY =
"Reduce confidence when PDE type, smoothness, grid spacing, time step, boundary conditions, stability regime, stencil order or refinement evidence are underspecified."
}
AI_CONSUMPTION {
PURPOSES = [
SemanticSearch,
OntologyGrounding,
FiniteDifferenceReasoning,
DifferenceStencilReasoning,
PDEDiscretisationReasoning,
ConsistencyAnalysis,
StabilityAnalysis,
CFLReasoning,
BoundaryStencilReasoning,
ExplicitSchemeReasoning,
ImplicitSchemeReasoning,
GridRefinementReasoning,
NumericalDiffusionReasoning,
NumericalDispersionReasoning,
KnowledgeGraphConstruction,
RetrievalAugmentation,
RecursiveInference
]
NORMALISE {
"finite difference" -> FiniteDifferenceMethod
"finite differences" -> FiniteDifferenceMethod
"difference stencil" -> DifferenceStencil
"forward difference" -> ForwardDifference
"backward difference" -> BackwardDifference
"central difference" -> CentralDifference
"explicit scheme" -> ExplicitScheme
"implicit scheme" -> ImplicitScheme
"Crank-Nicolson" -> CrankNicolsonScheme
"CFL condition" -> CFLCondition
"von Neumann stability analysis" -> VonNeumannAnalysis
}
INTERPRETATION_ORDER = [
detect_finite_difference_context,
identify governing_equation_dimension_grid_spacing_time_step_boundary_conditions_and_accuracy target,
classify elliptic_parabolic_hyperbolic_or_mixed problem,
select derivative stencils_and_time scheme,
construct discrete equations,
analyse consistency_stability_CFL_and_boundary treatment,
solve implicit systems_if_required,
assess grid_refinement_error_dispersion_and_diffusion,
return semantic output
]
}
EXECUTION_RULES {
E1:
IF query_mentions("finite difference")
OR derivative_or_PDE_discretisation_by_grid differences
THEN activate(FiniteDifferenceOntology)
E2:
IF first_derivative_at_interior
THEN consider central_difference_for_higher_symmetry_accuracy
E3:
IF boundary_node
THEN use one_sided_or_ghost_point treatment
E4:
IF hyperbolic_explicit_scheme
THEN check CFL condition
E5:
IF diffusion_explicit_scheme
THEN check method-specific dt/h^2 stability restriction
E6:
IF implicit_scheme
THEN identify linear_or_nonlinear system solver
E7:
IF convergence_claimed
THEN compare solutions_under_grid_and_time refinement
E8:
IF sharp_transport_features
THEN assess numerical_diffusion_dispersion_and_monotonicity
E9:
IF nonuniform_grid
THEN derive spacing-aware finite_difference coefficients
}
RECURSION {
ENTRY = FiniteDifferenceMethod
EXPAND(FiniteDifferenceMethod) -> [
FiniteDifferenceFormula,
DifferenceStencil,
Grid,
MeshSpacing,
TimeStep,
UniformGrid,
NonuniformGrid,
ForwardDifference,
BackwardDifference,
CentralDifference,
HigherOrderStencil,
ExplicitScheme,
ImplicitScheme,
SemiImplicitScheme,
CrankNicolsonScheme,
UpwindScheme,
LaxFriedrichsScheme,
LaxWendroffScheme,
LeapfrogScheme,
BoundaryCondition,
GhostPoint,
Stability,
Consistency,
Convergence,
TruncationError,
CFLCondition,
VonNeumannAnalysis,
NumericalDispersion,
NumericalDiffusion
]
EXPAND(SpatialStencils) -> [
FirstDerivativeStencil,
SecondDerivativeStencil,
HigherOrderStencil,
UpwindStencil,
BoundaryStencil
]
EXPAND(TimeSchemes) -> [
ExplicitEuler,
BackwardEuler,
CrankNicolsonScheme,
LeapfrogScheme,
LaxFriedrichsScheme,
LaxWendroffScheme
]
EXPAND(PDEApplications) -> [
PoissonEquationScheme,
LaplaceEquationScheme,
DiffusionScheme,
AdvectionScheme,
WaveEquationScheme
]
STOP_CONDITION =
"Stop when the PDE or derivative target, grid, stencil, time scheme, boundary treatment, stability, consistency, convergence and error behaviour are sufficiently resolved."
}
ROUTING {
PARENT_ONTOLOGY = "Numerical Analysis"
IMMEDIATE_CONTEXTS = [
"Numerical Analysis Ontology",
"Numerical Methods Ontology",
"Numerical Differentiation Ontology",
"Differential Equations Ontologies"
]
RELATED_ONTOLOGIES = [
"Numerical Analysis Ontology",
"Numerical Methods Ontology",
"Numerical Differentiation Ontology",
"Iterative Methods Ontology",
"Numerical Analysis",
"Applied Mathematics Ontologies",
"Differential Equations Ontologies",
"Partial Differential Equations Ontologies",
"Ordinary Differential Equations Ontologies",
"Linear Algebra Ontologies",
"Computational Model Ontology",
"Scientific Computing Ontologies",
"Model Verification Ontology"
]
ROUTE_RULES = [
"Finite Difference -> Numerical Analysis Ontology for consistency, stability and convergence semantics",
"Finite Difference -> Numerical Methods Ontology for algorithm selection",
"Finite Difference -> Numerical Differentiation for derivative stencil semantics",
"Finite Difference -> Differential Equations for governing-equation structure",
"Finite Difference -> Iterative Methods for implicit-system solution",
"Finite Difference -> Linear Algebra for matrix discretisations",
"Finite Difference -> Computational Model for executable grid models",
"Finite Difference -> Scientific Computing for large-scale simulation",
"Finite Difference -> Model Verification for grid-convergence and error assessment"
]
}
UPDATE_MODEL {
MODE = "append-compatible semantic versioning"
MAJOR = "ontology-breaking conceptual change"
MINOR = "new compatible finite-difference schemes, stencils or reasoning pathways"
PATCH = "clarification, metadata or formatting correction"
RULES = [
"Preserve derivative-by-difference semantics.",
"Preserve grid-and-stencil semantics.",
"Preserve explicit-versus-implicit distinction.",
"Preserve consistency-stability-convergence distinction.",
"Preserve CFL-aware interpretation.",
"Preserve boundary-treatment semantics.",
"Preserve numerical diffusion and dispersion awareness.",
"Preserve machine-readable finite-difference semantics."
]
}
OUTPUT {
CANONICAL_DEFINITION =
"A finite difference method approximates derivatives or differential equations using algebraic differences on discrete grids."
STENCIL_SUMMARY =
"Difference stencils specify the neighbouring nodes and coefficients used to approximate differential operators."
EXPLICIT_SUMMARY =
"Explicit schemes compute new values directly from already known values but may have restrictive stability limits."
IMPLICIT_SUMMARY =
"Implicit schemes solve algebraic systems involving new-state unknowns and may permit larger stable time steps."
CONSISTENCY_SUMMARY =
"Consistency measures whether the discrete equations approach the governing differential equations as the grid is refined."
STABILITY_SUMMARY =
"Stability measures whether numerical perturbations remain controlled."
CONVERGENCE_SUMMARY =
"Convergence measures whether the finite-difference solution approaches the exact solution under refinement."
CFL_SUMMARY =
"CFL-type conditions relate time-step and grid spacing for stability in many explicit transport and wave schemes."
ERROR_SUMMARY =
"Finite-difference error can include truncation, boundary, numerical diffusion, numerical dispersion, iteration and roundoff components."
}
FLOW {
INPUT
-> detect_finite_difference_context
-> identify differential_operator_or_equation_dimension_domain_grid_spacing_time_step_boundary_conditions_and_accuracy requirements
-> classify elliptic_parabolic_hyperbolic_ODE_or_derivative approximation
-> select spatial_stencils_and_time scheme
-> construct discrete_difference equations
-> apply boundary_and_initial conditions
-> analyse local_truncation_error_and_consistency
-> analyse stability_and_CFL restrictions
-> solve explicit_or_implicit discrete system
-> assess grid_refinement_convergence_dispersion_diffusion_and_global error
-> route to numerical_analysis_ontology numerical_methods numerical_differentiation iterative_methods differential_equations linear_algebra computational_model scientific_computing_or_model_verification ontology
-> recursively_expand_required_dependencies
-> verify_result
-> assign_confidence
-> produce_semantic_output
-> END
}
SEMANTIC_SUMMARY {
"The Finite Difference Ontology defines numerical approximation of derivatives and differential equations through discrete grid differences. It supports forward, backward, central and higher-order stencils, explicit and implicit schemes, Crank-Nicolson, upwind and wave/transport schemes, boundary conditions, ghost points, consistency, stability, convergence, CFL restrictions, truncation error, numerical diffusion, numerical dispersion and grid-refinement reasoning."
}
FLOW_HASH {
METHOD = "semantic-content-identity"
ID = "KIRETH-MATH-APPLIED-MATHEMATICS-FINITE-DIFFERENCE-ONTOLOGY-V1"
}
}
END_FLOW
Download Code
Copy to Clipboard