steve_bank
Diabetic retinopathy and poor eyesight. Typos ...
Simulation of large non homogeneous volumes is often done by Fineries Element Analysis. It is simple in principle. Duvide an object into regions and define the properties and equations for the region, Then subdivide each section in smaal subdivisions. This process is called meshing. Impossible to do by hand it is done by different algorithms. The shape used affects speed and accuracy.
A flat metal plate is meshed into small volumes. Initial conditions are a heat source on one end. The transfer is computed volume to volume. It is a numerical solver, trial and error. I image climate simulations use this technique.
https://en.wikipedia.org/wiki/Finite_element_method
Neshing
https://en.wikipedia.org/wiki/Mesh_generation
FEA is the primary tool in engineering, it is usually included in 3D solid modeling tools.
I have played around with demo version of Flexpde. Plenty of documentation, examples, and free books. A good free book on solving field problems.
https://www.pdesolutions.com/index.html
Sample script for heat flow
As a preview example to give the flavor of a FlexPDE descriptor file, we will construct a model of heatflow on a square domain.
The heatflow equation is
div(K*grad(Temp)) + Source = 0
If K is constant and Source = 4*K, the heat equation will be satisfied by the function
Temp = Const - x^2 - y^2 .
We define a square region of material of conductivity K = 1, with a uniform heat source of 4 heat units per unit area.
We further specify the boundary value
Temp = 1 - x^2 - y^2
Since we know the analytic solution, we can compare the accuracy of the FlexPDE solution.
The text of the descriptor is as follows:
{ *******************************************************************
SIMPLE.PDE
This sample demonstrates the simplest application of FlexPDE to
heatflow problems.
******************************************************************* }
TITLE "Simple Heatflow"
VARIABLES
temp { Identify "Temp" as the system variable }
DEFINITIONS
k = 1 { declare and define the conductivity }
source = 4 { declare and define the source }
texact = 1-x^2-y^2 { exact solution for reference }
INITIAL VALUES
temp = 0 { unimportant in linear steady-state problems,
but necessary for time-dependent or nonlinear
systems }
EQUATIONS { define the heatflow equation :}
div(k*grad(temp)) + source = 0
BOUNDARIES { define the problem domain: }
REGION 1 { ... only one region }
{ specify Dirichlet boundary at exact solution: }
VALUE(temp)=texact
START(-1,-1) { specify the starting point }
LINE TO (1,-1) { walk the boundary }
TO (1,1)
TO (-1,1)
TO CLOSE { bring boundary back to starting point }
MONITORS
CONTOUR(temp) { show the Temperature during solution }
PLOTS { write these plots to disk at completion: }
CONTOUR(temp) { show the solution }
SURFACE(temp) { show a surface plot as well }
{ display the solution error :}
CONTOUR(temp-texact) AS "Error"
{ show a vector flow plot: }
VECTOR(-dx(temp),-dy(temp)) AS "Heat Flow"
END { end of descriptor file }
A flat metal plate is meshed into small volumes. Initial conditions are a heat source on one end. The transfer is computed volume to volume. It is a numerical solver, trial and error. I image climate simulations use this technique.
https://en.wikipedia.org/wiki/Finite_element_method
Neshing
https://en.wikipedia.org/wiki/Mesh_generation
FEA is the primary tool in engineering, it is usually included in 3D solid modeling tools.
I have played around with demo version of Flexpde. Plenty of documentation, examples, and free books. A good free book on solving field problems.
https://www.pdesolutions.com/index.html
Sample script for heat flow
As a preview example to give the flavor of a FlexPDE descriptor file, we will construct a model of heatflow on a square domain.
The heatflow equation is
div(K*grad(Temp)) + Source = 0
If K is constant and Source = 4*K, the heat equation will be satisfied by the function
Temp = Const - x^2 - y^2 .
We define a square region of material of conductivity K = 1, with a uniform heat source of 4 heat units per unit area.
We further specify the boundary value
Temp = 1 - x^2 - y^2
Since we know the analytic solution, we can compare the accuracy of the FlexPDE solution.
The text of the descriptor is as follows:
{ *******************************************************************
SIMPLE.PDE
This sample demonstrates the simplest application of FlexPDE to
heatflow problems.
******************************************************************* }
TITLE "Simple Heatflow"
VARIABLES
temp { Identify "Temp" as the system variable }
DEFINITIONS
k = 1 { declare and define the conductivity }
source = 4 { declare and define the source }
texact = 1-x^2-y^2 { exact solution for reference }
INITIAL VALUES
temp = 0 { unimportant in linear steady-state problems,
but necessary for time-dependent or nonlinear
systems }
EQUATIONS { define the heatflow equation :}
div(k*grad(temp)) + source = 0
BOUNDARIES { define the problem domain: }
REGION 1 { ... only one region }
{ specify Dirichlet boundary at exact solution: }
VALUE(temp)=texact
START(-1,-1) { specify the starting point }
LINE TO (1,-1) { walk the boundary }
TO (1,1)
TO (-1,1)
TO CLOSE { bring boundary back to starting point }
MONITORS
CONTOUR(temp) { show the Temperature during solution }
PLOTS { write these plots to disk at completion: }
CONTOUR(temp) { show the solution }
SURFACE(temp) { show a surface plot as well }
{ display the solution error :}
CONTOUR(temp-texact) AS "Error"
{ show a vector flow plot: }
VECTOR(-dx(temp),-dy(temp)) AS "Heat Flow"
END { end of descriptor file }