Hi, Henry,
In one of the ea
Hi, Henry,
In one of the earlier responses on this forum you said that transient solvers may not converge for steady-state problems. Right now I am trying to model some polymer extrusion process using OpenFOAM, but it looks like there is no solver for steady-state laminar flow of nonNewtonian fluids. Do you think nonNewtonianIcoFoam can be used for my purpose by setting the runTime long enough? (simpleFoam seems to be for turbulent flow, rather than laminar flow) If you don't think so, could you explain a little bit what I should do? Thanks a lot. |
Use simpleFoam with the "lamin
Use simpleFoam with the "laminar" turbulence model.
|
I want to patch, in the first
I want to patch, in the first zone where y<1,
a viscosity wich is different than the one in the second zone where y>1. How can i do that, please Thanks a lot. |
Have a look at the setGammaDam
Have a look at the setGammaDambreak utility in the damBreak tutorial on how to access the cell centres.
Change the createFields.H in your solver and make the nu into a volScalarField. Either use the same syntax as for e.g. p in which case it gets read from disk or use the extra constructor argument: volScalarField nu ( IOobject ( "nu", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar(transportProperties.lookup("nu") ) ); |
Hi, Henry,
Thanks for your
Hi, Henry,
Thanks for your last reply. I tried simpleFoam and it got a converged solution for my problem. But the pressure seems about 2 orders lower than expected. I am somehow confused about the PDE equation defined in simple foam, which is: tmp<fvvectormatrix> UEqn ( fvm::div(phi, U) + turbulence->divR(U) ); UEqn().relax(); solve(UEqn() == -fvc::grad(p)); It seems the diffusion term, fvm::laplacian(fluid->nu(), U), doesn't appear here. I think it it included in the turbulence->divR(U) term, but can not figure it out by looking at the source code. My question is, if I use laminar model in simpleFoam, are the PDEs in nonNewtonianIcoFoam and SimpleFoam going to be exactly the same (except for the time derivative) ? How does simpleFoam read in the transport properties(I don't see 'transportProperties.lookup("nu")' in simpleFoam's sourcecode) ? Thanks a lot. |
simpleFoam should give very si
simpleFoam should give very similar results to nonNewtonianIcoFoam.
The laminar transport model is created by autoPtr<transportmodel> laminarTransport ( transportModel::New(U, phi) ); in simpleFoam and equivalently by autoPtr<transportmodel> fluid ( transportModel::New(U, phi) ); in nonNewtonianIcoFoam, dimensionedScalar nu ( transportProperties.lookup("nu") ); is redundant and should be removed. The laminar stress term is indeed included in turbulence->divR(U) |
Thanks, Henry. I checked the s
Thanks, Henry. I checked the source code and is much better informed now.
I have a very simple question (maybe stupid) about the following line of code: fvc::div(nuEff( )*dev(fvc::grad(U)( ).T( ))) It looks like this is the momentum source, which is ignored in nonNewtonianIcoFoam. But I have never seen expressions like "grad(U)( )" in C++ code (a function call followed immediately by a pair of brackets). Is the return value from grad(U) used as a function name here? Thanks a lot if you can clarify a little bit. |
In incompressible flow that te
In incompressible flow that term will be small but only zero if the viscosity is uniform and hence formally should be included in nonNewtonianIcoFoam.
fvc::grad(U) returns a tmp<voltensorfield> and the transpose member function .T() is called for the const volTensorField& returned by the tmp dereferencing operator (). |
All times are GMT -4. The time now is 16:00. |