
[Sponsors] 
April 18, 2008, 08:29 
I must admit I did not see tha

#21 
Senior Member
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 16 
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 

April 25, 2008, 07:25 
Hi Dragos,
i have a new probl

#22 
Member
davey david
Join Date: Mar 2009
Posts: 54
Rep Power: 13 
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 

April 28, 2008, 03:19 
Hi Davey
My quess would be,

#23 
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,864
Rep Power: 33 
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 nondimensional quantities. Best regards Niels
__________________
Please note that I do not use the Friendfeature, so do not be offended, if I do not accept a request. 

April 29, 2008, 07:10 
Hi Niels,
i did as you said a

#24 
Member
davey david
Join Date: Mar 2009
Posts: 54
Rep Power: 13 
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 

April 29, 2008, 07:42 
Hi Davey
You need to elabor

#25 
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,864
Rep Power: 33 
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
__________________
Please note that I do not use the Friendfeature, so do not be offended, if I do not accept a request. 

April 30, 2008, 05:31 
Hi,
in running my solver(modi

#26 
Member
davey david
Join Date: Mar 2009
Posts: 54
Rep Power: 13 
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:stream&) in "/home/cfd/OpenFOAM/OpenFOAM1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::error::abort() in "/home/cfd/OpenFOAM/OpenFOAM1.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/OpenFOAM1.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/OpenFOAM1.4.1/applications/bin/linuxGccDPOpt/junctionFoam" #4 main in "/home/cfd/OpenFOAM/OpenFOAM1.4.1/applications/bin/linuxGccDPOpt/junctionFoam" #5 __libc_start_main in "/lib/libc.so.6" #6 Foam::regIOobject::readIfModified() in "/home/cfd/OpenFOAM/OpenFOAM1.4.1/applications/bin/linuxGccDPOpt/junctionFoam" From function checkMethod(const fvMatrix<type>&, const fvMatrix<type>&) in file /home/cfd/OpenFOAM/OpenFOAM1.4.1/src/finiteVolume/lnInclude/fvMatrix.C at line 1208. FOAM aborting any body who can help? many thanks davey 

April 30, 2008, 07:24 
The Dimensions of the operands

#27 
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,146
Rep Power: 46 
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)
__________________
Note: I don't use "Friend"feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request 

August 12, 2008, 07:39 
In my diploma thesis I simulat

#28 
New Member
Apanasevich, Pavel
Join Date: Mar 2009
Location: Bremen, Germany
Posts: 2
Rep Power: 0 
In my diploma thesis I simulate the mixing process in a Tshaped micromixer (width 200μm, height 100μm). The flow is laminar (steadystate) 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 (hexcells). 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 CFDACE+ 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 CFDACE+ and experimental results) but C is not between 1 and 0 fvSolution file for all cases: … C PBiCG { tolerance 1e06; 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 

September 16, 2008, 08:07 
hello,
i am simulating the fl

#29 
Member
davey david
Join Date: Mar 2009
Posts: 54
Rep Power: 13 
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!?? 

September 16, 2008, 10:45 
hello!
I am new on the openfo

#30 
New Member
Hansjoerg Seybold
Join Date: Mar 2009
Posts: 15
Rep Power: 13 
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 

September 16, 2008, 11:45 
fluentMeshToFoam
fluent3DMesh

#31 
Senior Member
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 13 
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 

September 16, 2008, 13:44 
Thanks Gavin,
i have a fluent

#32 
New Member
Hansjoerg Seybold
Join Date: Mar 2009
Posts: 15
Rep Power: 13 
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 

August 23, 2014, 01:07 

#33  
New Member
Jonas L. Ansoni
Join Date: Jun 2011
Location: Brazil
Posts: 22
Rep Power: 11 
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! 

August 21, 2020, 10:45 
recirculating scalar

#34 
Member
Rosario Arnau
Join Date: Feb 2017
Location: Spain
Posts: 53
Rep Power: 5 
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:
{ Recirc_T { type surfaceFieldValue; operation areaIntegrate; libs ("libfieldFunctionObjects.so"); writeArea yes; regionType patch; surfaceFormat foam; name RecirculationOutlet; enabled true; writeControl writeTime; //writeControl timeStep; //Output every timestep //writeInterval 1; //Cada timestep, guarda valor valueOutput true; log false; writeFields no; fields ( T) } Thanks! 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Passive scalar transport  novyno  OpenFOAM Running, Solving & CFD  10  May 5, 2016 13:31 
Scalar transport  Sanchit  CFX  0  September 29, 2008 07:46 
Negative scalar transport  diegon  OpenFOAM Running, Solving & CFD  0  December 1, 2006 08:30 
Steady scalar transport  heather  OpenFOAM Running, Solving & CFD  2  August 31, 2005 08:44 
Scalar Transport Equations  123  Main CFD Forum  6  August 10, 1998 09:05 