I must admit I did not see tha
I must admit I did not see that C was a volVectorField. I don't understand how do you want to use this vector as a scalar, though.
As I understand, you want to track 2 scalars. Then, why don't you use 2 scalar transport equations for that? Dragos |
Hi Dragos,
i have a new probl
Hi Dragos,
i have a new problem;how do i modify the navier stokes equation in the code to reflect dimensionless variables?the previuos issue has been resolved,thanks for your help. davey |
Hi Davey
My quess would be,
Hi Davey
My quess would be, that it is not straight forward to do so. The dimensions of your velocity and pressure fields are easily set to 0 in the /0/-directory. A quick look into e.g. Foam::Time in Doxygen shows that you cannot set the dimensions on time through the constructors (and therefor probably not on the mesh either). This results in a ddt of a dimensionless field which obvious will have s^{-1}. On the other hand grad(p) is m^{-1} thus a mismatch in dimensions and OF will return an error. My conclusion is that it is not possible to make an implementation of the dimensionless equations in OF, except of course you defined the length, mass and time scale and write down the equations using those, but then I would prefer using the implementation as it is and do the dimensionless calculation on a piece of paper to figure out the initial condition to reflect the values of your non-dimensional quantities. Best regards Niels |
Hi Niels,
i did as you said a
Hi Niels,
i did as you said and have now got my equations.however there is a new problem;i need to add the laplace equation to my solver because i need to solve for electric potential(fields) in particular regions of my mesh.i tried doing it as before(i.e like adding a source term to a code)but i am getting error messages all the while.can you please help out here? thanks in advance davey |
Hi Davey
You need to elabor
Hi Davey
You need to elaborate a little bit on that. I am not into electric field, so please correct me if I am wrong, but aren't the equations for the electric field quite similar to those in potentialFoam? You might find inspiration there. - Niels |
Hi,
in running my solver(modi
Hi,
in running my solver(modified icofoam),i am hit with this error message: --> FOAM FATAL ERROR : incompatible dimensions for operation [U[0 1 -2 0 0 0 0] ] - [U[0 -1 -1 0 0 0 0] ]#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/cfd/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::error::abort() in "/home/cfd/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so" #2 void Foam::checkMethod<foam::vector<double> >(Foam::fvMatrix<foam::vector<double> > const&, Foam::fvMatrix<foam::vector<double> > const&, char const*) in "/home/cfd/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/junctionFoam" #3 Foam::tmp<foam::fvmatrix<foam::vector<double> > > Foam::operator-<foam::vector<double> >(Foam::tmp<foam::fvmatrix<foam::vector<double> > > const&, Foam::tmp<foam::fvmatrix<foam::vector<double> > > const&) in "/home/cfd/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/junctionFoam" #4 main in "/home/cfd/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/junctionFoam" #5 __libc_start_main in "/lib/libc.so.6" #6 Foam::regIOobject::readIfModified() in "/home/cfd/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/junctionFoam" From function checkMethod(const fvMatrix<type>&, const fvMatrix<type>&) in file /home/cfd/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fvMatrix.C at line 1208. FOAM aborting any body who can help? many thanks davey |
The Dimensions of the operands
The Dimensions of the operands do not fit (have a look at the programmers guide chapter 1.5 and discussions about "incompatible dimensions for operation" elsewhere on the board).
The first operand (basically [(m/s)/s]) looks OK for the velocity equation. The second one is missing m^2/s (propably in your nu) |
In my diploma thesis I simulat
In my diploma thesis I simulate the mixing process in a T-shaped micro-mixer (width 200μm, height 100μm). The flow is laminar (steady-state) thus I am using the simpleFoam solver and I've added the scalar transport equation
fvm::ddt(C) + fvm::div (phi,C) –fvm::laplacian(DC,C) in the solver in order to solve the species equation and calculate the concentration field in the mixer. The scalar is released at the inlet 2 (C=1), and at the inlet 1 (C=0, dimensionless) there is no scalar. The boundary condition for the velocity is a parabolic velocity profile (Umax = 3.29m/s at the Inlet 1 und -3.29 m/s at the Inlet 2). At the outlet I am using zeroGradient for velocity und fixedValue (0) for p (pressure). The cells size is 4μm - 4μm - 4μm (hex-cells). The problem is the following: the calculated concentration must be between 0 and 1 but I receive values from -0.16 until 1.16. I've tried the following steps: 1) div (phi,U) Gauss limitedLinearV 1.0; div (phi,C) Gauss limitedLinear 1.0; laplacian (DC,C) Gauss linear corrected; Result: C = -0.153 – 1.08, but the physical sense of mixing is not correct (compared to simulation results using CFD-ACE+ and experimental results) 2) div (phi,U) Gauss linear;UpwindV Gauss; div (phi,C) Gauss Gamma01 1 Gauss; laplacian (DC,C) Gauss linear limited 1.0; Result: C = -0.17 – 1.07, the physical sense of mixing is better than 1) but is not correct too. 3) div (phi,U) Gauss linearUpwindV Gauss; div (phi,C) Gauss linearUpwind Gauss; laplacian (DC,C) Gauss linear corrected; Result: C = -0.157 – 1.16, the physical sense of mixing is correct (compared to simulation results using CFD-ACE+ and experimental results) but C is not between 1 and 0 fvSolution file for all cases: … C PBiCG { tolerance 1e-06; relTol 0; preconditioner DILU; }; … RelaxationFactors P 0.3; U 0.7; C 0.7; … fvSchemes: … fluxRequiment { default no; P; C; (here I've tried with and without C -ïƒ* I cannot see any difference) How can I improve my results from approach #3, so that my concentration is in the boundaries between 1 and 0? Thanks in advance , Pavel |
hello,
i am simulating the fl
hello,
i am simulating the flow and mixing effects in a rectangular channel(pure EOF). i introduce a scalar transport equation to see the mixing effects,thus fvm::ddt(C) + fvm::div (phi,C)–fvm::laplacian(DC,C) i have set the concentration in one half of my mesh to 1 and 0 in the other(used setfields,because of periodicity of the channel).this implies no inlet/outlet.the velocity values from steady state flow are used as the initial velocity conditions. unfortunately i cant see the convective mixing in paraview?? can i anybody help,please!?? |
hello!
I am new on the openfo
hello!
I am new on the openfoam message board. I have a question related to the scalartransportfoam. I calculated a solution of steady state NS in a complex geometry. Now i would like to solve the heat transport (scalartransport is exactly what i need.) how can i import the fluent Mesh and Velocity field to openfoam? thanks a lot hansjoerg |
fluentMeshToFoam
fluent3DMesh
fluentMeshToFoam
fluent3DMeshToFoam gambitMeshToFoam - all do exactly what they say on the tin, so to speak. Why do you need to import a velocity field though - you can calculate that as part of the solution, surely? Gavin |
Thanks Gavin,
i have a fluent
Thanks Gavin,
i have a fluent solution for the steady state NS already and i think fluent3DMeshToFoam only convert the mesh without the velocity values. I read about ensightToFoam to import mesh and values. is this true? thanks hj |
Quote:
I'm simulating the transport of a passive scarlar (C) in a biphasic flow by interDyFoam and monitoring the value of C in specified points by probes. I created a new solver based on interDyFoam (interDyMScalarFoam.C) as can seen on the attached files. The solver works, however I've obtained negative values in the C probes points (pontoMonitTracer_C). Jerome reported a similar problem on post #12. I tried to use other numerical schemes such as suggested by Jasak on post #13, but without success. Does anyone have any suggestion? Link to download the files (interDyMScalarFoam.C, C, fvSchemes, fvSolutions) https://dl.dropboxusercontent.com/u/...onForum.tar.gz Thanks in advance! |
recirculating scalar
Hi foamers,
I know this is an old post but I have a question about scalars/concentration at scalarTransportFoam solver. I'have seen that there are some experts at this threat so hope one of you can help me: In my case I have two inlets (Inlet 1 and RecirculationInt) and two outlets (Outlet and RecirculationOutlet). The flow enters the domain by the Inlet and exits through Outlet but, the flow that enters through Inlet and RecirculationInlet exits the domain through RecirculationOutlet so that the flows going in and out are: Inlet Flow= Q1 +Q2 RecirculationInlet= Q3 Outlet= -Q1 RecirculationOutlet= -(Q2+Q3) Now I need to introduce an scalar so that the concentration that goes out through RecirculationOutlet need to enter again in the domain in order to avoid lossing my scalar concentration. I'm able to calculate the surface concentration of the patch throughout: Code:
{ Thanks! |
All times are GMT -4. The time now is 23:28. |