Hello,

 

I am now trying to solve the thermoelasticity problem using libmesh. I
modified ex3 of reduced_basis  by adding the temperature as a variable and
by adjusting the matrixes. I started from a simple steady case of a cuboid.
Its left side is clamped and the temperature there is fixed at 0 degree
while there is a heat flux entering on the right side. The heat flux is set
as the only parameter. It works well but I encountered problems when
imposing a non-zero temperature on the left. 

 

At the beginning, I tried penalty method and intended to set the boundary
temperature as a parameter. Therefore, I add a new matrix and a new vector
in assembly.c. These two objects are defined as boundary_assembly  and the
terms are calculated like in ex3 of introduction. However, a convergence
error occurs:

 

============================================================================
====================================

Assembling affine operator 1 of 2

Assembling affine operator 2 of 2

Assembling affine vector 1 of 2

Assembling affine vector 2 of 2

Convergence error. Error id: -3

Stack frames: 8

0: libMesh::print_trace(std::ostream&)

1: libMesh::MacroFunctions::report_error(char const*, int, char const*, char
const*)

2:
libMesh::RBConstruction::check_convergence(libMesh::LinearSolver<double>&)

3: libMesh::RBConstruction::compute_Fq_representor_innerprods(bool)

4: libMesh::RBConstruction::train_reduced_basis(bool)

5: ./Thermoelasticity-opt() [0x41df39]

6: __libc_start_main

7: ./Thermoelasticity-opt() [0x41e77d]

[0] src/reduced_basis/rb_construction.C, line 2124, compiled Jan  6 2018 at
16:42:44

 

 

Then I turned to another method. I created a DirichletBoundary object and
add it to the map just like ex4 of introduction except that I defined a
function that returns a constant instead of the "exact_solution":

 

============================================================================
============================================================================
===========================

std::set<boundary_id_type> boundary_ids;
  boundary_ids.insert(BOUNDARY_ID_MIN_X);

  // Create a vector storing the variable numbers which the BC applies to
  std::vector<unsigned int> variables(4);
  variables[0] = T_var; 

  std::vector<unsigned int> variables_displacement(3);
  variables_displacement[0] = u_var;  variables_displacement[1] = v_var;
variables_displacement[2] = w_var;

  ZeroFunction<> zf;
  AnalyticFunction<> fun_object(fun_wrapper);

  DirichletBoundary dirichlet_bc(boundary_ids, variables, fun_object);

  DirichletBoundary dirichlet_bc_displacment(boundary_ids,
variables_displacement, zf);

  get_dof_map().add_dirichlet_boundary(dirichlet_bc);

   get_dof_map().add_dirichlet_boundary(dirichlet_bc_displacement);

============================================================================
=====================================

 

in rb_classes.h. The code runs well but when I check the output, I find that
the temperature on the left remains 0 instead of the value I set in the
constant function. 

 

I would like to know whether my methods are right or not. If not, could you
please tell me where the error is and show me other possible solution?
Thanks a lot for your kindness. 

 

Best regards,

 

Gauvain

 

 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to