# Derivative in multiregion

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

 May 10, 2022, 00:12 Derivative in multiregion #1 New Member   Mostafa Join Date: Oct 2021 Posts: 22 Rep Power: 4 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

 May 15, 2022, 17:09 #2 New Member   Mostafa Join Date: Oct 2021 Posts: 22 Rep Power: 4 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

 November 16, 2023, 08:25 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 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

 November 17, 2023, 00:23 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 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

 Tags derivative, electric field, multiregions