CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Derivative in multiregion

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 10, 2022, 00:12
Default Derivative in multiregion
  #1
New Member
 
Mostafa
Join Date: Oct 2021
Posts: 22
Rep Power: 4
mostafa kareem is on a distinguished road
I solved the electric potential (phi) over fluid and solid mesh like a multi-region solver and I got continuous electric potential through coupling the two domains using iterative class ( compressible Turbulent Baffle) to set equal fluxes across interface which is used in heat transfer problems.

My question is regarding the Electric field : E = -fvc::grad(phi)

although I had continuous electric potential (phi) across interface, i failed to get a continuous electric field across the interface after taking the gradient of phi

what i did is that

in the fluid domain i solved the electric potential and then took the derivative

solve
(
fvm::laplacian(epsilon,phiS)
);

E = -1*fvc::grad(phiS);

and also i did the same in solid regions


solve
(
fvm::laplacian(epsilon,phiS)
);

E = -1*fvc::grad(phiS);


in electric field file in the zero file , i set all the boundaries to calculated

i'm asking about how the fvc::grad() can compute continous electric field (E) while computing every one on seperate mesh


Thanks in advance
mostafa kareem is offline   Reply With Quote

Old   May 15, 2022, 17:09
Default
  #2
New Member
 
Mostafa
Join Date: Oct 2021
Posts: 22
Rep Power: 4
mostafa kareem is on a distinguished road
i found the solution

simply, we have main polymesh folder , fluid polymesh and solid polymesh. so , after computig the electric potential over the two seperate meshes , we do a for loop on the solid data and fluid data and assign these data to the corresponding cells in the main mesh
mostafa kareem is offline   Reply With Quote

Old   November 16, 2023, 08:25
Default Can you please explain a little bit more to get the continuous electric field.?
  #3
New Member
 
Barath V R
Join Date: Aug 2022
Posts: 2
Rep Power: 0
barathravi is on a distinguished road
Hi Mostafa,

Glad that you found the solution.

Can you please explan a little bit more on the for loop.?

Like whether it has to be created in the main solver and run during every time iteration or can be used for post processing alone.?

As I am new to OpenFOAM please help me with this problem.

Thanks,
Barath
barathravi is offline   Reply With Quote

Old   November 17, 2023, 00:23
Default How to access the original polymesh in the time loop of chtMultiRegionFoam.?
  #4
New Member
 
Barath V R
Join Date: Aug 2022
Posts: 2
Rep Power: 0
barathravi is on a distinguished road
Hi Mostafa,

Can you please help me with some idea on how to access the original polymesh in the time loop of chtmultiregionfoam to calculate the derived variables.?

Thanks,
Barath
barathravi is offline   Reply With Quote

Reply

Tags
derivative, electric field, multiregions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add source term and material derivative of log(T) in openFaom. idrees khan OpenFOAM Programming & Development 1 January 27, 2021 14:32
Error when calculating the second derivative using the derivative function d2dy2 mona.li Tecplot 0 July 8, 2018 14:11
Derivative of a scalar or a variable through UDF fevi84 Fluent UDF and Scheme Programming 7 February 3, 2015 21:39
Tangential derivative on curved boundary Simbelmynė Main CFD Forum 40 October 14, 2014 06:57
discontinuous second derivative new_at_this Main CFD Forum 9 April 28, 2012 16:55


All times are GMT -4. The time now is 09:54.