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

Solving the Same Governing Equations Over Different Regions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 25, 2018, 07:57
Default Solving the Same Governing Equations Over Different Regions
  #1
Member
 
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 83
Rep Power: 8
Saleh Abuhanieh is on a distinguished road
Hi Foamers,

I am trying to develop a solver that can solve the following equations for different regions. I had to segregate the domain for different regions since a special BC shall be maintained between them.

Equations from the standard solver are:

solve
(
fvm::laplacian(phi) + rho/epsilon
);


rhoFlux = -k*mesh.magSf()*fvc::snGrad(phi);

solve
(
fvm::ddt(rho) + fvm::div(rhoFlux, rho)
);


Noting that before going to the solving step, all the associated fields and constants in the equations are replaced by the regions related ones. I used ptrLists to define the same names for fields and constants for each region.

The solver compiled without error, but when I run the case, it crashes once starts solving:

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigSegv::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::UPtrList<Foam::fvsPatchField<double> >:perator[](int) const in "/home/sfa/OpenFOAM/sfa-5.0/platforms/linux64GccDPInt32Opt/bin/electrostaticMultiRegionFoam"
#4 ? in "/home/sfa/OpenFOAM/sfa-5.0/platforms/linux64GccDPInt32Opt/bin/electrostaticMultiRegionFoam"
#5 Foam::fvMatrix<double>::fvMatrix(Foam::GeometricFi eld<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:?
#6 Foam::fv::gaussLaplacianScheme<double, Foam::SymmTensor<double> >::fvmLaplacianUncorrected(Foam::GeometricField<do uble, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#7 Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#8 Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::laplacian<double>(Foam::GeometricField< double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/sfa/OpenFOAM/sfa-5.0/platforms/linux64GccDPInt32Opt/bin/electrostaticMultiRegionFoam"
#9 ? in "/home/sfa/OpenFOAM/sfa-5.0/platforms/linux64GccDPInt32Opt/bin/electrostaticMultiRegionFoam"
#10 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11 ? in "/home/sfa/OpenFOAM/sfa-5.0/platforms/linux64GccDPInt32Opt/bin/electrostaticMultiRegionFoam"
Segmentation fault (core dumped)


I thought maybe I need to define (explicitly) a fvMatrix for each region using ptrList also but i didn't know how since I've two equations, I tried one matrix for each equation just to see what will happen:

phiMatrix
(
fvm::laplacian(phi) + rho/epsilon
);

phiMatrix.solve();


rhoFlux = -k*mesh.magSf()*fvc::snGrad(phi);


rhoMatrix
(
fvm::ddt(rho) + fvm::div(rhoFlux, rho)
);

rhoMatrix.solve();


I received the the following compilation error:

error: no match for call to ‘(Foam::fvScalarMatrix {aka Foam::fvMatrix<double>}) (Foam::tmp<Foam::fvMatrix<double> >)’
);



Any help will be appreciated

Saleh
Saleh Abuhanieh is offline   Reply With Quote

Old   April 26, 2018, 11:00
Default
  #2
Member
 
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 83
Rep Power: 8
Saleh Abuhanieh is on a distinguished road
any clue pls.
Saleh Abuhanieh is offline   Reply With Quote

Old   April 27, 2018, 06:03
Default
  #3
Member
 
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 83
Rep Power: 8
Saleh Abuhanieh is on a distinguished road
please notify me if the provided information is not sufficient
Saleh Abuhanieh is offline   Reply With Quote

Reply


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
Problem with chtMultiregionFoam radiation boundary condition baran_foam OpenFOAM Running, Solving & CFD 10 December 17, 2019 18:36
Free surface issues with interDyMFoam for hydroturbine oumnion OpenFOAM Running, Solving & CFD 0 October 6, 2017 15:05
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 03:20
Cannot run the code properly: very large time step continuity error crst15 OpenFOAM Running, Solving & CFD 9 December 14, 2014 19:17
Error while running rhoPisoFoam.. nileshjrane OpenFOAM Running, Solving & CFD 8 August 26, 2010 13:50


All times are GMT -4. The time now is 08:36.