Advection Diffusion Solver setup

Numerical methods and mathematical models of Elmer
Post Reply
Gary R
Posts: 162
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Advection Diffusion Solver setup

Post by Gary R »

Hi all,
Operating System: Debian GNU/Linux 11
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 5.10.0-13-amd64
OS Type: 64-bit
Processors: 4 × AMD FX(tm)-4350 Quad-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: AMD CAICOS

After supposedly solving the Concentration Diffusivity vs Diffusion Coefficient problem (see other topic) , I am still having problems getting things to run. I keep getting a "WARNING:: ListFind: Requested property: [concentration Diffusivity], not found" error. I have included the .brep file for anyone who wants to start from scratch, a screen shot and the .sif file. I may be way off base with the setup. The object is to determine the diffusion rate of air into the tube. I may want to include a Hydrogen flow component later.
Any help will be sincerely appreciated.

Gary R.
Attachments
Screenshot_Tube.png
Screenshot_Tube.png (3.49 KiB) Viewed 506 times
Tube-Body.brep
(15.11 KiB) Downloaded 44 times
case.sif
(2.83 KiB) Downloaded 49 times
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Advection Diffusion Solver setup

Post by raback »

Hi Gary,

Material section is missing the property. It is not there. Also it could not be a constant parameter since binary diffusion coefficients depend on the both substances. The carrier fluid and the diluted fluid.

-Peter
Gary R
Posts: 162
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: Advection Diffusion Solver setup

Post by Gary R »

Thanks Peter,
The problem now converges. I am attaching the modified .sif file. I modified the file for time steps. The problem converges but every other time interval shows a gray tube and the other intervals show -what looks like- reasonable data. I used the Chapman-Enskog Theory to compute the Diffusion constant for air and hydrogen. This came out to 1.278 cm^2/s. Should this be in m^2/s. If so I am off by a factor of 1e-4 which could explain the mixing of the gasses in the sub millisecond range. Please advise.

Gary R
Attachments
case.sif
(2.87 KiB) Downloaded 48 times
Rich_B
Posts: 421
Joined: 24 Aug 2009, 20:18

Re: Advection Diffusion Solver setup

Post by Rich_B »

Hello Gary,

I'll try to answer your questions, but please be gentle.

gray tube: either add ' Post File = case.vtu' in the Simulation section, or add the ResultOutputSolver, but don't do both. The solver log includes this statement, telling you what not to do: WARNING:: AddVtuOutputSolverHack: ResultOutputSolver instance with VTU format already exists, doing nothing!

units: you must be consistent with units. Elmergui defines some constants, such as density, and uses SI units. Diffusion literature tends to use CGS units. Make your life easier and convert CGS units to SI units.

Your sif file defines Material 1 and Material 2. For the AdvectionDiffusion solver, there is only one variable, Concentration, so only one material should be defined. The solver log includes this statement: WARNING:: LoadInputFile: > Material 2 < not used in any Body!

Hope this helps.

Rich.
Gary R
Posts: 162
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: Advection Diffusion Solver setup

Post by Gary R »

Hi all,
Turns out that I inadvertently switched on the Results Solver. Switching this off solved the alternate grey .vtu frames.

I'm not sure that including only one gas in the material section is correct. Both Air and Hydrogen are involved . The body's initial condition is that it is filled with Hydrogen. Not sure I understand the problem. The present simulation shows that Air encroaches into the tube at about 0.03m/s which seams reasonable I guess. I don't have a lot of confidence in the simulation since I really don't feel like I know what I am doing.

I've included the latest .sif file

Gary R.
Attachments
case.sif
(2.71 KiB) Downloaded 44 times
Rich_B
Posts: 421
Joined: 24 Aug 2009, 20:18

Re: Advection Diffusion Solver setup

Post by Rich_B »

Hello Gary,

I've been learning a lot lately about solid diffusion, such as boron diffusing into silicon. The advection diffusion solver calculates the boron concentration, while not tracking the concentration of the silicon substrate.

Binary gas mixture diffusion is different (and still very similar at the same time) from solid diffusion and not exactly intuitive.

Think of the empty tube as being filled with a sponge where a gas can diffuse into the sponge, but not circulate or otherwise flow. If the sponge starts filled with air, and then hydrogen is added at one end, the advection diffusion solver calculates the concentration of one of the two materials. If we know the concentration of one, then the other must make up the difference to 100%. For example, if the advection diffusion solver says there is 10% hydrogen, then it doesn't need to track the air at 90%, since they must add up to 100%.

Not being all that familiar with diffusion, and being self taught off the internet, if someone with better knowledge can comment and correct the above description, that would be great.

Thanks, Rich.
Post Reply