Recently I have used SfePy for the computational homogenization and I found that SfePy has offered the homogenization component. Thanks for that. However, this feature is only for microscopic structure that means the simulation is for an RVE (Representative Volume Elements) with the deformation gradient or strain in the context of solid mechanics as the input to set boundary conditions for microscopic structure.
In my work, I simulate a structure made of the inhomogeneous materials. This means that at each Gauss points in computing of stiffness matrix we compute the average stress and effective moduli by simulating the microscopic RVE (this feature is already available in SfePy). However, In SfePy we set up a material object with its parameters at the beginning and call or setup a terms file.

Do you know the solution or the way using terms feature to compute the homogenization in macro scale?

Thanks and Best Regards,
Minh Nguyen