How to calculate total flow over a time interval

Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to calculate total flow over a time interval

Julianna_J
Hi! I calculated flow rate over a boundary at a given time by doing boundary integration rho * u* n. How can I integrate this over a time interval to find flow rate over a given time interval?
Reply | Threaded
Open this post in threaded view
|

Re: How to calculate total flow over a time interval

Precise Simulation
Administrator
There is currently no built-in functionality to integrate over time. You would have use the toolbox with Matlab, export your data (https://www.featool.com/doc/post#postex), and perform the integration there (https://www.featool.com/doc/intbdr_8m), for example something like:

    val = 0;
    ind_b = array_of_boundary_numbers_to_integrate
    for i_sol=1:length(fea.sol.t)
      val = val + intbdr( 'rho_ns*(nx*u+ny*v)', fea, ind_b, 2, i_sol ); 
    end
    dt = fea.sol.t(end) - fea.sol.t(1);
    result = val / dt