|
[Sponsors] |
TernaryMixture solving two MassTransport equation coupled |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 22, 2017, 12:42 |
TernaryMixture solving two MassTransport equation coupled
|
#1 |
New Member
Rafael Jurado Cruz
Join Date: Sep 2014
Location: Córdoba (Spain)
Posts: 9
Rep Power: 11 |
Hello everyone,
I would like to modify the IcoFoam solver to solve two MassTransport equation which are coupled like this: 1.- ∂C1/∂t + ∂Ui·C1/∂xj = D11 · ∂^2 C1/∂^2xj + D12 · ∂^2 C2/∂^2xj 2.- ∂C2/∂t + ∂Ui·C2/∂xj = D22 · ∂^2 C2/∂^2xj + D21 · ∂^2 C1/∂^2xj I would like to do this time discretization: (C1^(n+1) - C1^(n))/dt = 0.5*[DiffC1 + DiffC2]^(n+1) + 0.5*[DiffC1 + DiffC2]^(n) + 1.5*ConvC1^(n) - 0.5*ConvC1^(n-1) (C2^(n+1) - C2^(n))/dt = 0.5*[DiffC2 + DiffC1]^(n+1) + 0.5*[DiffC2 + DiffC1]^(n) + 1.5*ConvC2^(n) - 0.5*ConvC2^(n-1) So, I have tried this in OpenFOAM: 1.- solve ( fvm::ddt(C1) + 0.5*(fvm::div(phi, C1) + fvc::div(phi, C1)) - 0.5*(fvm::laplacian(D11, C1) + fvc::laplacian(D11, C1)) - 0.5*(fvm::laplacian(D12, C2) + fvc::laplacian(D12, C2)) ); 2.- solve ( fvm::ddt(C2) + 0.5*(fvm::div(phi, C2) + fvc::div(phi, C2)) - 0.5*(fvm::laplacian(D22, C2) + fvc::laplacian(D22, C2)) - 0.5*(fvm::laplacian(D21, C1) + fvc::laplacian(D21, C1)) ); and I have putted this into a loop to iterate until C1 and C2 is converged. The problem comes from the term [fvm::laplacian(D12, C2)] in the first equation and [fvm::laplacian(D21, C1)] in the second one. I think that this is because, you can not use an implicit term of a variable while solving the other one. Let say the term [fvm::laplacian(D12, C2)] (i.e. DiffC2^(n+1)) in the first equation. So I have two question, the first one and the most important is: 1.- How can I managed to introduce the other Concentration explicitly in each equation in OpenFOAM? And the second one is; 2.- How can I take the concentration variable of two previous timesteps for using an Adam-Bashforth time discretization in the convection terms, i.e. [-0.5*ConvCi^(n-1)]? Thank you in advance... Kind regards, Last edited by Rafael Jurado; March 24, 2017 at 03:56. |
|
March 24, 2017, 03:57 |
|
#2 |
New Member
Rafael Jurado Cruz
Join Date: Sep 2014
Location: Córdoba (Spain)
Posts: 9
Rep Power: 11 |
Is there anyone who can help me??
Thank you in advance... |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Maximum number of iterations exceeded chtmultiregionsimpleFoam | Moncef | OpenFOAM Running, Solving & CFD | 28 | July 13, 2020 14:26 |
pimpleDyMFoam computation randomly stops | babapeti | OpenFOAM Running, Solving & CFD | 5 | January 24, 2018 05:28 |
calculation stops after few time steps | sivakumar | OpenFOAM Running, Solving & CFD | 7 | March 17, 2013 06:37 |
Orifice Plate with a fully developed flow - Problems with convergence | jonmec | OpenFOAM Running, Solving & CFD | 3 | July 28, 2011 05:24 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 18:07 |