CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   source term in near wall cell (https://www.cfd-online.com/Forums/openfoam-pre-processing/124031-source-term-near-wall-cell.html)

rajcfd September 26, 2013 06:25

source term in near wall cell
 
Hello foamers,

I need to add source terms specific only to the near wall cells. Can anyone suggest a way to do it?



regrads,

Raj

nimasam September 28, 2013 09:05

three hints:
1- if its on patch then you should modify your boundary condition or may using funkySetFields

2- if its in internalField, then you would want to modify your solver and using setField or funkySetFields to defines that region

3- you may want to try Swak4Foam

Best Regards

rajcfd September 30, 2013 09:29

Quote:

Originally Posted by nimasam (Post 454028)
three hints:
1- if its on patch then you should modify your boundary condition or may using funkySetFields

2- if its in internalField, then you would want to modify your solver and using setField or funkySetFields to defines that region

3- you may want to try Swak4Foam

Best Regards


Thanks nimasam. Will try and then get in touch with you...


regards,
Raj

xiaof October 2, 2013 04:53

hello foamers:
I have a boundary condition which I need use groovy bc. I set it as:
Code:

   
type                groovyBC;
    gradientExpression  "gradT";
    variables          "gradT=h&k;";
    value              uniform 0;
    fractionExpression  "0";

After I run my solver,I got the following messages:
Code:

Starting time loop

Time = 0.002

Courant Number mean: 0 max: 0.018457 velocity magnitude: 1.0013
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 3.34725e-08, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 3.46171e-08, No Iterations 2
DILUPBiCG:  Solving for Uz, Initial residual = 1, Final residual = 5.18204e-08, No Iterations 2
DICPCG:  Solving for p, Initial residual = 1, Final residual = 9.56645e-07, No Iterations 456
time step continuity errors : sum local = 4.24956e-11, global = 1.10631e-13, cumulative = 1.10631e-13
DICPCG:  Solving for p, Initial residual = 0.0001707, Final residual = 9.46825e-07, No Iterations 266
time step continuity errors : sum local = 1.00183e-08, global = 3.48549e-12, cumulative = 3.59613e-12
DICPCG:  Solving for p, Initial residual = 1.53399e-06, Final residual = 9.69365e-07, No Iterations 213
time step continuity errors : sum local = 1.02131e-08, global = 1.92931e-10, cumulative = 1.96527e-10
[1] swak4Foam: Allocating new repository for sampledGlobalVariables
[12] swak4Foam: Allocating new repository for sampledGlobalVariables
[2] swak4Foam: Allocating new repository for sampledGlobalVariables
[7] swak4Foam: Allocating new repository for sampledGlobalVariables
[13] swak4Foam: Allocating new repository for sampledGlobalVariables
[15] swak4Foam: Allocating new repository for sampledGlobalVariables
[10] swak4Foam: Allocating new repository for sampledGlobalVariables
[4] swak4Foam: Allocating new repository for sampledGlobalVariables
[0] swak4Foam: Allocating new repository for sampledGlobalVariables
[9] swak4Foam: Allocating new repository for sampledGlobalVariables
[3] swak4Foam: Allocating new repository for sampledGlobalVariables
[5] swak4Foam: Allocating new repository for sampledGlobalVariables
[11] swak4Foam: Allocating new repository for sampledGlobalVariables
[14] swak4Foam: Allocating new repository for sampledGlobalVariables
[6] swak4Foam: Allocating new repository for sampledGlobalVariables
[8] swak4Foam: Allocating new repository for sampledGlobalVariables

what does this
Code:

swak4Foam: Allocating new repository for sampledGlobalVariables
mean?

Does it mean that the boundary condition is not "h&k"?

Thank you very much!

regards!

xiaof

gschaider October 8, 2013 19:37

Quote:

Originally Posted by xiaof (Post 454628)
hello foamers:
I have a boundary condition which I need use groovy bc. I set it as:
Code:

   
type                groovyBC;
    gradientExpression  "gradT";
    variables          "gradT=h&k;";
    value              uniform 0;
    fractionExpression  "0";

After I run my solver,I got the following messages:
Code:

Starting time loop

Time = 0.002

Courant Number mean: 0 max: 0.018457 velocity magnitude: 1.0013
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 3.34725e-08, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 3.46171e-08, No Iterations 2
DILUPBiCG:  Solving for Uz, Initial residual = 1, Final residual = 5.18204e-08, No Iterations 2
DICPCG:  Solving for p, Initial residual = 1, Final residual = 9.56645e-07, No Iterations 456
time step continuity errors : sum local = 4.24956e-11, global = 1.10631e-13, cumulative = 1.10631e-13
DICPCG:  Solving for p, Initial residual = 0.0001707, Final residual = 9.46825e-07, No Iterations 266
time step continuity errors : sum local = 1.00183e-08, global = 3.48549e-12, cumulative = 3.59613e-12
DICPCG:  Solving for p, Initial residual = 1.53399e-06, Final residual = 9.69365e-07, No Iterations 213
time step continuity errors : sum local = 1.02131e-08, global = 1.92931e-10, cumulative = 1.96527e-10
[1] swak4Foam: Allocating new repository for sampledGlobalVariables
[12] swak4Foam: Allocating new repository for sampledGlobalVariables
[2] swak4Foam: Allocating new repository for sampledGlobalVariables
[7] swak4Foam: Allocating new repository for sampledGlobalVariables
[13] swak4Foam: Allocating new repository for sampledGlobalVariables
[15] swak4Foam: Allocating new repository for sampledGlobalVariables
[10] swak4Foam: Allocating new repository for sampledGlobalVariables
[4] swak4Foam: Allocating new repository for sampledGlobalVariables
[0] swak4Foam: Allocating new repository for sampledGlobalVariables
[9] swak4Foam: Allocating new repository for sampledGlobalVariables
[3] swak4Foam: Allocating new repository for sampledGlobalVariables
[5] swak4Foam: Allocating new repository for sampledGlobalVariables
[11] swak4Foam: Allocating new repository for sampledGlobalVariables
[14] swak4Foam: Allocating new repository for sampledGlobalVariables
[6] swak4Foam: Allocating new repository for sampledGlobalVariables
[8] swak4Foam: Allocating new repository for sampledGlobalVariables

what does this
Code:

swak4Foam: Allocating new repository for sampledGlobalVariables
mean?

Does it mean that the boundary condition is not "h&k"?

No. This is just an informative output. Ignore it

JasonWang3 February 1, 2016 10:31

Hi

I meet the same situation that a source term is needed in the momentum equation only near the wall cell centres. Have you find a how to add such a source term?

Xinguang


All times are GMT -4. The time now is 17:12.