CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Which application should I use to solve this equation (http://www.cfd-online.com/Forums/openfoam/84142-application-should-i-use-solve-equation.html)

 qibintj January 20, 2011 23:58

Which application should I use to solve this equation

Hello Foamers,
I am a beginner, which application should I use to solve these equation

In region 1
∇∙[(1-s)^1.5 ∇c]=0
∇∙[s^3 (-4.24s+〖3s〗^2)∇s]=0

In region 2
∇∙[(1-s)^1.5 ∇c]=1-s
∇∙[s^3 (-4.24s+〖3s〗^2)∇s]=1-s

anyhelp will be thankful.

 Bernhard January 21, 2011 03:29

I suggest to write your own application, that is what you can do with OpenFOAM relatively easily. No guarantees for convergent solutions however. Especially since you equations are not very linear in s :) Good luck!

 qibintj January 21, 2011 05:00

Thanks.
Are there similar standard applications I can modify to solve it?

 Bernhard January 21, 2011 05:22

You can have a look in the basic solvers to start with.

 Cyp January 21, 2011 07:46

Hi!

I think you can start from laplacianFoam and define a source term that depends on the region you consider. You can develop something like that :

Code:

```volScalarField source = alpha * (1-S) + (scalar(1)-alpha); volScalarField Sc = pow((1-S),1.5); volScalarField Ss = pow(S,3)*(-4.24*S + pow(3*S,2)) solve ( fvm::laplacian(Sc,c) == source ); solve ( fvm::laplacian(Ss,S) == source );```
where alpha is a volScalarField defined by
- 0 within Region 1
- 1 within Region 2

I advise you to use the setFields utility to set up alpha.
Be careful to the units.

Best regards,
Cyp

 qibintj January 24, 2011 02:01

Thanks a lot
Another question, how can I deal with the interface boundary condition between region1 and region2. Suppose c(region1)=c(region2).

 Cyp January 24, 2011 05:06

I guess that if you defined your 2 regions by an indicator function such as "alpha", the continuity is automatically garanteed.

Regards,
Cyp

 benk January 24, 2011 16:52

Quote:
 Originally Posted by qibintj (Post 291820) Another question, how can I deal with the interface boundary condition between region1 and region2. Suppose c(region1)=c(region2).
You can use conjugateHeatFoam (in the dev versions) or chtMultiRegionFoam for this. These solvers will ensure a continuous flux between the regions as well as c(region1)=c(region2).

 All times are GMT -4. The time now is 13:06.