CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Help to implement a new code to cure kinetics (https://www.cfd-online.com/Forums/openfoam-programming-development/104857-help-implement-new-code-cure-kinetics.html)

 vikthor July 17, 2012 08:17

Help to implement a new code to cure kinetics

3 Attachment(s)
Hi foamers!

I'm modifying the code of laplacianFoam to calculate the cure kinetics, but I have problems to get it. I believe that the problem is that I unknow how openFoam solve the ecuations. If someone could help me, I would appreciate it. I attached the 3 archives I have modified.

Thanks a lot!!

 akidess July 17, 2012 11:12

Quote:
 [...] I have problems to get it [...]
I'm having troubles guessing what those problems were...

 vikthor July 17, 2012 11:34

The error displayed is

--> FOAM FATAL ERROR:
incompatible fields for operation
[T] - [curedegree]

I believe the error appears because I'm solving one equation with two variables. Some ideas??

 akidess July 17, 2012 12:09

If your assumption is correct, it should be solved by using:
Code:

`fvm::ddt(T) - fvm::laplacian(DT, T) - fvc::ddt(DC, curedegree)`

 vikthor July 17, 2012 13:47

thanks Anton
now it runs and calculate correctly de temperature field, but it doesn´t solve the curedegree (the initial and final residual of all steps 0 and the number of iteracion in each step is 0). It seems that ignore the cure kinetics terms and solve like the laplacianFoam.

 helmut July 17, 2012 16:18

Looks like your degree eqn has the form
ddt(curedegree) - N(cureDegree,T) = 0,
where N is a nonlinear function. Maybe some linearizing is required?

 vikthor July 18, 2012 07:35

Hi Helmut

I linearized the equation N(curedegree,T) and run, but doesn't solve the curedegree, only solve the temperature field.

 Achuth May 16, 2017 10:32

You can solve for the degree of cure by means of an explicit finite difference scheme. If you know the parameters of the equation, you can just put them as a separate header file to solve for the rate of cure and this can be implemented in the solver.

So, in general the equation will look like this in OpenFOAM.

fvc::ddt(c) == A*exp(-Ea/R*T)*pow(c,m)*pow((1-c),n)

With A, Ea, R, m, n known and with an initial conversion c0 (say 10^-20) you could solve the rate of cure explicitly.

fvc - stands for explicitly solving the equation.

 nkv1990 August 3, 2017 14:18

Composite curring simulation in Openfoam

I am new to the openfoam and i want to simulate in curring of composite but dont know which solver i have to start and how to incorporate the cure kinetics in the solver for solving it implicitly. Can any help me in this regard.

 nkv1990 August 3, 2017 14:19

Composite curring simulation in Openfoam

I am new to the openfoam and i want to simulate curring of composite but dont know which solver i have to start with and how to incorporate the cure kinetics in the solver for solving it implicitly. Can anybody help me in this regard.

 Achuth August 3, 2017 15:54

I have solved the problem I had mentioned earlier in this thread.

It depends on which kind of problem you want to solve.

If you want to just solve the static cure kinetics problem, then take laplacianFoam and work with it.

If you want to work with mold filling problems, take the interFoam solver and take on of the phases as resin and the other as air. The alphaEqn.H solves the phase fraction equation. Then you will have to implement the conservation of energy equation in terms of temperature. Then, integrate the transport equation for the degree of cure.

Its a long process to understand the physics behind the mold filling problem. I am currently working at a research facility and made the solver for mold filling process for LCM process. But I cannot provide the solver. Its strictly for our research facility.