Need program statement for FORD Solve a time-dependent heat equation in 1D. See GEMINI-docs repo for a description of the specific problem solved here
write the time, space length adn spatial grid to a file initial conditions typical diffusion time, make our time step a fraction of this time interations output
Type | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|
type(hdf5_file) | :: | h5f | ||||
integer, | parameter | :: | npts | = | 256 | |
integer, | parameter | :: | lt | = | 20*5 | |
character(len=*), | parameter | :: | outfile | = | 'test_diffusion1d.h5' | |
character(len=4) | :: | ic | ||||
real(kind=wp), | dimension(npts) | :: | v1 | |||
real(kind=wp), | dimension(npts) | :: | dx1i | |||
real(kind=wp), | dimension(-1:npts+2) | :: | x1 | |||
real(kind=wp), | dimension(-1:npts+2) | :: | TsEuler | |||
real(kind=wp), | dimension(-1:npts+2) | :: | TsBDF2 | |||
real(kind=wp), | dimension(-1:npts+2) | :: | Tstrue | |||
real(kind=wp), | dimension(npts) | :: | lambda | |||
real(kind=wp), | dimension(npts) | :: | A | |||
real(kind=wp), | dimension(npts) | :: | B | |||
real(kind=wp), | dimension(npts) | :: | C | |||
real(kind=wp), | dimension(npts) | :: | D | |||
real(kind=wp), | dimension(npts) | :: | E | |||
real(kind=wp), | dimension(npts+1) | :: | x1i | |||
real(kind=wp), | dimension(0:npts+2) | :: | dx1 | |||
integer | :: | lx1 | ||||
integer | :: | it | ||||
integer | :: | ix1 | ||||
integer | :: | ierr | ||||
real(kind=wp) | :: | t | = | 0 | ||
real(kind=wp) | :: | dt | ||||
real(kind=wp) | :: | Tsminx1 | ||||
real(kind=wp) | :: | Tsmaxx1 | ||||
real(kind=wp), | dimension(npts) | :: | errorEuler | create a grid for the calculation |
||
real(kind=wp), | dimension(npts) | :: | errorBDF2 | create a grid for the calculation |