I am modeling neutron absorption within a cylindrical sample. Neutron flux is the same on all surfaces of the cylinder and decreases as it is absorbed and approaches the center of the sample. This is a steady state, 2-D in space PDE in the r and z direction. I was able to create a solution to this equation using the PDEtoolbox (finite element method) by reducing the cylindrical problem to 2-D using coordinate transformation as described in one of the matlab examples.
Now using this solution to the neutron flux profile throughout the cylinder, I need to set up an equation which integrates the flux profile change across the entire volume of the sample to reflect the total neutrons absorbed. Then I need to fit this equation to actual data of total neutrons absorbed to solve for the real flux in the reactor (flux on the surface of the samples). I imagine that the solution to the PDE derived in the pdetoolbox needs to be exported into the command window to perform these remaining steps.
So I'm looking to learn how to:
1) Export solutions to PDE's into the command window
2) Manipulate/perform calculations with the solution to the PDE once it is available in the command window
3) Write equations containing the solution to the PDE
4) Do data fitting with equations which include solutions to a PDE from the PDE toolbox
Any direction to examples of this being done would be great!
No products are associated with this question.
For your point 3), in addition to Bill Greene's suggestions, it will be useful to look at the answer to
This shows how express a solution in terms of any (r,z). Once you have this form, you can do useful operations.
I fyou coudl give us an example that would probably be best. BUt some friends for your journey:
doc sprintf doc disp dos str2func doc func2str
I think I can at least point you in the right direction.
There are a couple of PDE Toolbox functions you will probably need to calculate that integral: pdetrg which will calculate the area of each triangular element, and pdeintrp which will interpolate the solution from the node points to the center of each triangle.
If you look at the documentation for these functions, you see that they require the p and t matrices, and the solution vector, of course. To export these to the MATLAB workspace from pdetool, select Mesh/Export Mesh... and Solve/Export Solution...