I am currently working on a single constitutive model describing two collagen fiber families with different elemental properties. The strain energy density function is W, where there would be two values of W for the two fiber families:

```
`Wi = 1/2*c*(I1 - 3) + (k1/(2*k2) (Exp(k2*Ei)) -
1), (* i = 1, 2, these are the two fibre families*)
Ei = Tr(hi)) - 1 (* i = 1, 2, a structure strain invariant for the two families*)
hi1=k*bmod +(1 - (3*k))*(TensorProduct(a1, a1));
hi2 =k*bmod + (1 - (3*k))*(TensorProduct(a2, a2));`
(*a1 and a2 are vectors that describe the mean orientations of the fibre families with respect to the reference direction*)
```

I have not outlined all the variables, but I think this is sufficient to describe the general idea of what the constitutive model outlines. Using the above information, a single AceGen element must be generated that describes both fiber families for later analysis in AceFem. Since I need to create an element containing 2 strain energy density functions instead of one, I was wondering if it's possible to create more than one tangent and remainder matrix in a tangent and remainder subroutine. My current subroutine for an optical fiber family looks like this (I did not enter the full code, but I think the relevant parts are just the tangent and residual compilation:

```
SMSStandardModule("Tangent and residual");
skipR = SMSLogical(SMSInteger(idata$$("SkipResidual")) == 1);
skipK = SMSLogical(SMSInteger(idata$$("SkipTangent")) == 1);
NoIp = SMSInteger(es$$("id", "NoIntPoints"));
SMSDo(Ig, 1, NoIp);
ElementDefinitions("Tangent");
Export velocity and acceleration;
SMSExport({v(1), v(2), v(3), v(4), v(5), v(6)},
Table(ed$$("ht", Ihg + i), {i, 6}));
wgp = SMSReal(es$$("IntPoints", 4, Ig));
SMSDo(i, 1, Length(pe);
Residual;
Rg1 = fGauss wgp SMSD(
W + T - ((Rho)*u.bforces), pe, i, "Constant" -> a);
(*This process would have to be repeated twice for the fibre families W1 and W2*)
SMSIf(! skipR); (*assembly of residual vector*)
SMSExport(Rg,
p$$(i), "AddIn" -> True);
SMSEndIf();
SMSIf(skipK);
SMSContinue();
SMSEndIf();
Tangent stiffness;
SMSDo(j, If(SMSSymmetricTangent, i, 1), Length(pe);
Kg = SMSD(Rg1, pe, j);
SMSExport(Kg, s$$(i, j), "AddIn" -> True);
SMSEndDo();
SMSEndDo();
SMSEndDo();
```

But as I mentioned earlier, I have to add the second equation for the second fiber family, and I'm not sure if it's possible to create more than one tangent and remainder matrix in a tangent and residual subroutine. I came up with the following options:

1) Create a loop that goes through the material properties of the two fiber families, but I was told by a project leader that this is not necessary, as I could only write down the two equations, but I wonder how that would work.

2) I also thought that I could create two separate AceGen elements, but that would require a kind of overlay that I think is not possible when inputting in AceFem for finite element analysis.

Ideas are of course welcome, thank you in advance.