100 likes | 219 Views
Component-Based Implementation of STOMP. Yilin Fang Bruce Palmer Pacific Northwest National Laboratory Silver Spring, 19-20 July 2007. STOMP BRIEF REVIEW. General-purpose tool addressing nonisothermal conditions, multiple-phase systems, nonaqueous phase liquids, subsurface reactive transport
E N D
Component-Based Implementation of STOMP Yilin Fang Bruce Palmer Pacific Northwest National Laboratory Silver Spring, 19-20 July 2007
STOMP BRIEF REVIEW • General-purpose tool addressing nonisothermal conditions, multiple-phase systems, nonaqueous phase liquids, subsurface reactive transport • Integrated-volume finite-difference discretization • Coupled flow equations solved with Newton-Raphson iteration • Variable operational modes depending on governing equations solved (water mass, air mass, oil mass, salt mass, thermal energy): STOMP-W, STOMP-WAE,… • Currently converted in FORTRAN 90, run on a variety of platforms 2
Transport equations solved after flow equations • Coupled transport and chemistry systems solved using operator-splitting, chemistry system is solved using Newton Raphson iteration • Petsc library is used to solve the linearized matrix equations for flow and transport • Mode selected: STOMP-W-sc 3
Zero Initialize Field prop Boundary prop Interior fluxes Boundary fluxes Sources Field prop Boundary prop Interior flux Boundary flux Jacobian interior Jacobian boundary STOMP-W-sc Flow Chart I/O Setup Time stepping N-R iteration Stepper Coupled flow Transport I/O Chemistry Solve 4
Status of Componentization • Completed (Initial) • Solver component • Chemistry component • Under development • Grid component 5
Solver Component package solver version 1.0 { interface SolverPort extends gov.cca.Port { void set_size( in array<int,1> luk, in array<int,1> lsize, in array<int,1> ifld, in array<int,1> jfld, in array<int,1> kfld); // define problem size; void set_inact_node(in array<int,3> ixi); // inactive node; void set_jac_pointer(in array<int,3> imxp); // jacobian pointer; void set_mat_diag(in array<double,5> adg); // diagonal block; void set_mat_bottom(in array<double,5> azl); // bottom block; void set_mat_top(in array<double,5> azu); // top block; void set_mat_west(in array<double,5> axl); // west block; void set_mat_east(in array<double,5> axu); // east block; void set_mat_south(in array<double,5> ayl); // south block; void set_mat_north(in array<double,5> ayu); // north block; void set_rhs(in array<double,4> apv); // right hand side element; void solver_solve( in int iter,out int icnv ); // assemble and solve equation; } } 6
Chemistry Component package speciation version 1.0 { interface SpeciationPort extends gov.cca.Port { void set_grid_volume(in array<double,3> vol); // grid volume; void set_porosity(in array<double,4> por); // porosity; void set_diff_porosity(in array<double,4> pord); // diffusion porosity; void set_tot_porosity(in array<double,4> port); // total porosity; void set_tot_conc(in array<double,4> c); // total transport concentration; void set_spec_conc(in array<double,4> sp_c); // individual species conc at present time; void set_spec_conco(in array<double,4> sp_co); // individual species conc at previous time; void set_lithology(in array<double,5> rs_s); // mineral property; void set_min_conc(in array<double,4> sp_cmn); // mineral concentration; void set_min_vf(in array<double,4> por_m); // mineral volume fraction; void set_wat_sat(in array<double,4> sl); // water saturation; void set_gas_sat(in array<double,4> sg); // gas saturation; void set_wat_dens(in array<double,4> rhol); // water density; void set_particle_dens( in array<double,3> rhos ); // particle density; void set_temperature( in array<double,4> t ); // temperature; void speciation(out int iecke); // solve } } 7
Grid Component • Current efforts are focused on encapsulating the grid functionality into a grid component and replacing the current structured orthogonal grids in STOMP with grids being developed under the Interoperable Technologies for Advanced Petascale Simulations (ITAPS) project. 8
Possible Mesh and Operator Components ITAPS Libraries ITAPS Mesh Operators STOMP Mesh Operators STOMP 9
Issues and Further Work • Borrow function has to be called to pass to functions defined in ports the scalars and arrays which are not defined as targets or pointers • Hard to figure out the stride in borrow function for multi- dimension arrays • Need to abstract chemistry component • Machine architecture related issues • Need of more advanced solver technologies because of the introduction of new grids, • Further componentizing the remaining STOMP code, and implementing the algorithms to couple the STOMP code to other models 10